יחידה:תאריך: הבדלים בין גרסאות בדף

מאין תקציר עריכה
מ ביטול גרסה 15812625 של Kotz (שיחה)
שורה 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 dif
return os.difftime (t2, t1)
else
else
local lang = mw.getContentLanguage()
local lang = mw.getContentLanguage()
return lang:formatDuration(dif, diffFormat)
return lang:formatDuration(os.difftime (t2, t1), diffFormat)
end
end
end
end
שורה 131: שורה 128:
end
end
local extradays=0
local success, res = pcall(parseDateRange, frame.args[1], diffFormat)
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