Modifications

Sauter à la navigation Sauter à la recherche

Module:Date

175 octets ajoutés, 12 février 2019 à 09:33
aucun résumé de modification
function date.i2u( dt )
d = mw.text.split( dt.args[1], '/') day = tonumber(d[1]) month week = tonumber(d[2]) season = tonumber(d[3]) year = tonumber(d[34]) u = math.floor((year+4495-1)*365.25)- 241 + day +(month-5)*30 + _if(monthseason>61, 18*12) + _if(monthseason>9 and year%4==12, 189) - +_if(month<5season>3, 189) - _if+(month < 4, 1) week- _if(month < 2, 1)*8+day+92
return u
end
u = math.floor((year+4495)*365.25)- 241 + day +(month-5)*30 + _if(month>6, 1) + _if(month>9 and year%4==1, 1) - _if(month<5, 1) - _if(month < 4, 1) - _if(month < 2, 1)
return u
end
 
function date.u2p( du )
year = math.ceil((du - 1)/365.25+0.00000001)-4495
day_year = du%1461-365*math.floor((du%1461)/365.25)-_if(year%4==1,1)
dt = ""
return dt
end
743
modifications

Menu de navigation