Content deleted Content added
simplify |
add catalog link |
||
Line 18:
local success, result = pcall(lang.formatDate, lang, 'F j, Y', y .. '-' .. m .. '-' .. d)
return success and result or nil
end
local function cataloglink(c, y)
if(c and tonumber(c)) then
local y1 = math.floor( (tonumber(yearstr) - 1) / 10 ) * 10 + 1
local y2 = y1 + 99
return '[http://eclipse.gsfc.nasa.gov/SEcat5/SE' .. tostring(y1) .. '-' .. tostring(y2) .. '.html ' .. c .. ']'
else
return c
end
end
Line 37 ⟶ 47:
setarg('map_caption', 'Map')
setarg('type_ref', '')
setarg('cat', cataloglink(dargs['Cat'], dargs['y']) )
setarg('nature', dargs['Ty'])
setarg('gamma', dargs['Gam'])
|