Module:Solar eclipse/sandbox: Difference between revisions

Content deleted Content added
sandybox
 
slightly simplifying regex ([%d][%d]* to %d+
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' ..