Module:Solar eclipse: Difference between revisions

Content deleted Content added
default size
publishing from sandbox new code written by Frietjes to address MOS:NEGATIVE violations as discussed here
Line 52:
local function parsetime(s)
if(s and s ~= '') then
local min = s:match('^%s*([%d][%d]*+)m%s*[%d][%d]*+s%s*$')
local sec = s:match('^%s*[%d][%d]*+m%s*([%d][%d]*+)s%s*$')
if( min and sec ) then
return tostring(tonumber(min)*60 + tonumber(sec)) .. ' sec' ..
Line 74:
 
local function loadsolardb(frame, s)
local yearstr = s:match('^%s*([%d][%d][%d][%d])[A-Z][a-z][a-z][%d][%d]%s*$') or ''
local function setarg(k, v)
if(v and v ~= '') then args[k] = v end
v = mw.ustring.gsub(v, '^%s*%-(%d)', '−%1')
args[k] = v
end
end
if( yearstr ~= '' ) then