Module:Solar eclipse: Difference between revisions

Content deleted Content added
test, will most likely need to expand
No edit summary
Line 35:
else
return s
end
end
 
local function parsekm(frame, s)
if(s and s:match('^%s*[%d][%d.]*%s*$')) then
return frame:expandTemplate{ title = 'convert', args = {s, 'km', 'mi', abbr = 'on'} }
else
if(s and s ~= '') then
return s .. ' km'
else
return nil
end
end
end
Line 76 ⟶ 88:
setarg('___location', '')
setarg('coords', parsecoord(frame,dargs['Loc']))
setarg('max_width', parsekm(frame,dargs['Wid'] and '{{convert|' .. dargs['Wid'] .. '|km|abbr=on}}'))
setarg('times_ref', '')
setarg('start_partial', dargs['TiPB'])