יחידה:תאריך: הבדלים בין גרסאות בדף
מאין תקציר עריכה |
מאין תקציר עריכה |
||
| שורה 108: | שורה 108: | ||
t2 = os.time() | t2 = os.time() | ||
end | end | ||
local dif=os.difftime (t2, t1)+extradays*24*60*60 | |||
if diffFormat=="raw" then | if diffFormat=="raw" then | ||
return | return dif | ||
else | else | ||
local lang = mw.getContentLanguage() | local lang = mw.getContentLanguage() | ||
return lang:formatDuration( | return lang:formatDuration(dif, diffFormat) | ||
end | end | ||
end | end | ||
| שורה 128: | שורה 131: | ||
end | end | ||
local success, res = pcall(parseDateRange, frame.args[1], diffFormat) | local extradays=0 | ||
if frame.args["כולל"]=="כן" then | |||
extradays=1 | |||
end | |||
local success, res = pcall(parseDateRange, frame.args[1], diffFormat, extradays) | |||
if success then | if success then | ||
if frame.args[2] == "גיל" then | if frame.args[2] == "גיל" then | ||