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