עריכת הדף "יחידה:תאריך"
קפיצה לניווט
קפיצה לחיפוש
ניתן לבטל את העריכה. נא לבדוק את השוואת הגרסאות שלהלן כדי לוודא שזה אכן מה שאתם רוצים לעשות, ולאחר מכן לפרסם את השינויים למטה כדי לסיים את ביטול העריכה.
גרסה אחרונה | הטקסט שלך | ||
שורה 164: | שורה 164: | ||
end | end | ||
-- | --ofset | ||
if offset ~= nil then | if offset ~= nil then | ||
if offset == 'Z' then | if offset == 'Z' then | ||
שורה 806: | שורה 806: | ||
local outputPrefix = '' | local outputPrefix = '' | ||
local parts = mw.text.split(dateRangeStr,' | local parts = mw.text.split(dateRangeStr,' +%- +') | ||
assert(#parts==2 or #parts==1, "Date range expected format is from - to or from (e.g from - now)") | assert(#parts==2 or #parts==1, "Date range expected format is from - to or from (e.g from - now)") | ||
שורה 899: | שורה 899: | ||
return dif | return dif | ||
else | else | ||
return outputPrefix..lang:formatDuration(dif, diffFormat) | |||
end | end | ||
end | end | ||
שורה 929: | שורה 924: | ||
-- the following translations are needed because the underline function | -- the following translations are needed because the underline function | ||
-- local format is wierd | -- local format is wierd | ||
str = mw.ustring.gsub(str, | str = mw.ustring.gsub(str, | ||
"(כ)־([א-ת])", "%1%2") | |||
str= mw.ustring.gsub(str,"וגם ([0-9])","ו-%1") | |||
str= mw.ustring.gsub(str,"וגם ([א-ת])","ו%1"); | |||
if frame.args[2] == "גיל" then | if frame.args[2] == "גיל" then | ||
שורה 980: | שורה 978: | ||
end | end | ||
end | end | ||
שורה 1,012: | שורה 983: | ||
Date['חשב טווח'] = parseDateRangeSafe; | Date['חשב טווח'] = parseDateRangeSafe; | ||
Date['parseDateRange'] = parseDateRange; | Date['parseDateRange'] = parseDateRange; | ||
return Date | return Date |