בדוקי עריכות אוטומטית, אינטערפעיס רעדאקטארן, אינטערפעיס אדמיניסטראַטאָרן, סיסאפן, מייבאים, מעדכנים, מייבא, אספקלריה רעדאקטארן
46,368
רעדאגירונגען
אין תקציר עריכה |
(אידיש) |
||
| שורה 561: | שורה 561: | ||
if (self.precision >= Date.PRECISION.MY100) and (self.precision <= Date.PRECISION.MY) then | if (self.precision >= Date.PRECISION.MY100) and (self.precision <= Date.PRECISION.MY) then | ||
if self.year>0 then | if self.year>0 then | ||
return (self.year/1000000) .. ' | return (self.year/1000000) .. ' מיליאן יאר צום ציילונג' | ||
else | else | ||
return (-self.year/1000000) ..' | return (-self.year/1000000) ..' מיליאן יאר פד"צ' | ||
end | end | ||
elseif (self.precision >=Date.PRECISION.KY100) and (self.precision <= Date.PRECISION.KY) then | elseif (self.precision >=Date.PRECISION.KY100) and (self.precision <= Date.PRECISION.KY) then | ||
| שורה 737: | שורה 737: | ||
local fd = '' | local fd = '' | ||
if self.precision >= Date.PRECISION.DAY then | if self.precision >= Date.PRECISION.DAY then | ||
fd = self.year < 0 and (-1 * self.year) .. ' | fd = self.year < 0 and (-1 * self.year) .. ' פד"צ' or fd .. self.year | ||
if options.link then fd = '[[' .. fd .. ']]' end | if options.link then fd = '[[' .. fd .. ']]' end | ||
local d = '2000-' .. prepend(self.month, '0', 2) .. '-' .. prepend(self.day, '0', 2) | local d = '2000-' .. prepend(self.month, '0', 2) .. '-' .. prepend(self.day, '0', 2) | ||
| שורה 743: | שורה 743: | ||
fd = fd .. '. ' .. lang:formatDate(options.link and '[[j xg]]' or 'j xg', d) | fd = fd .. '. ' .. lang:formatDate(options.link and '[[j xg]]' or 'j xg', d) | ||
elseif self.precision >= Date.PRECISION.MONTH then | elseif self.precision >= Date.PRECISION.MONTH then | ||
fd = self.year < 0 and (-1 * self.year) .. ' | fd = self.year < 0 and (-1 * self.year) .. ' פד"צ' or fd .. self.year | ||
local month = mw.getContentLanguage():formatDate('F', '2000-' .. self.month) | local month = mw.getContentLanguage():formatDate('F', '2000-' .. self.month) | ||
if options.link then fd = '[[' .. fd .. ']]' end | if options.link then fd = '[[' .. fd .. ']]' end | ||
fd = month .. ' ' .. fd | fd = month .. ' ' .. fd | ||
elseif self.precision >= Date.PRECISION.YEAR then | elseif self.precision >= Date.PRECISION.YEAR then | ||
fd = self.year < 0 and (-1 * self.year) .. ' | fd = self.year < 0 and (-1 * self.year) .. ' פד"צ' or fd .. self.year | ||
if options.link ~= 'nem' then fd = '[[' .. fd .. ']]' end | if options.link ~= 'nem' then fd = '[[' .. fd .. ']]' end | ||
elseif self.precision == Date.PRECISION.YEAR10 then | elseif self.precision == Date.PRECISION.YEAR10 then | ||
local year = math.floor((self.year < 0 and -1 * self.year or self.year) / 10) * 10 | local year = math.floor((self.year < 0 and -1 * self.year or self.year) / 10) * 10 | ||
fd = 'שנות ה-' .. tostring(year%100) .. ' של המאה ה-'.. tostring(ceil(year/100)) | fd = 'שנות ה-' .. tostring(year%100) .. ' של המאה ה-'.. tostring(ceil(year/100)) | ||
fd = self.year < 0 and year .. ' | fd = self.year < 0 and year .. ' פד"צ' or tostring(year) | ||
elseif self.precision == Date.PRECISION.YEAR100 then | elseif self.precision == Date.PRECISION.YEAR100 then | ||
if self.year < 0 then | if self.year < 0 then | ||
fd = 'המאה ה-' .. math.floor(-1 * self.year / 100) .. ' | fd = 'המאה ה-' .. math.floor(-1 * self.year / 100) .. ' פד"צ' | ||
else | else | ||
fd = 'המאה ה-' ..math.floor(self.year / 100) | fd = 'המאה ה-' ..math.floor(self.year / 100) | ||
| שורה 912: | שורה 912: | ||
if frame.args[2] == 'ימים' then | if frame.args[2] == 'ימים' then | ||
diffFormat = {'days'} | diffFormat = {'days'} | ||
elseif frame.args[2] == ' | elseif frame.args[2] == 'יארן' then | ||
diffFormat = {'years'} | diffFormat = {'years'} | ||
elseif frame.args[2] == 'שנים וימים' then | elseif frame.args[2] == 'שנים וימים' then | ||
| שורה 935: | שורה 935: | ||
if frame.args[2] == "גיל" then | if frame.args[2] == "גיל" then | ||
str= mw.ustring.gsub(str,"כ־(.+) שנים","%1 בערך") | str= mw.ustring.gsub(str,"כ־(.+) שנים","%1 בערך") | ||
str= mw.ustring.gsub(str," | str= mw.ustring.gsub(str," שנים","") | ||
end | end | ||
| שורה 946: | שורה 946: | ||
str = 2 | str = 2 | ||
end | end | ||
if str == " | if str == "יאר" then | ||
str = 1 | str = 1 | ||
end | end | ||
| שורה 958: | שורה 958: | ||
return str | return str | ||
else | else | ||
return frame.args['error'] or '<span class="scribunto-error"> | return frame.args['error'] or '<span class="scribunto-error">דאטום פעלער: '..res..'</span>[[קאטעגאריע:בלעטער מיט דאטום פעלערן]]' | ||
end | end | ||
end | end | ||
| שורה 964: | שורה 964: | ||
function parseStrDateSafe(frame) | function parseStrDateSafe(frame) | ||
local dateType = frame.args[2] | local dateType = frame.args[2] | ||
if dateType ==' | if dateType =='יאר' then | ||
dateType = 'Y' | dateType = 'Y' | ||
elseif dateType==' | elseif dateType=='מאנאט' then | ||
dateType = 'M' | dateType = 'M' | ||
elseif dateType==' | elseif dateType=='טאג' then | ||
dateType='D' | dateType='D' | ||
end | end | ||
| שורה 975: | שורה 975: | ||
if success then | if success then | ||
if dateType=='Y' and mw.ustring.sub( res, 0, 1)=='-' then | if dateType=='Y' and mw.ustring.sub( res, 0, 1)=='-' then | ||
res = mw.ustring.sub( res, 2).. ' | res = mw.ustring.sub( res, 2).. ' פד"צ' | ||
end | end | ||
return res | return res | ||
else | else | ||
return frame.args['error'] or '<span class="scribunto-error"> | return frame.args['error'] or '<span class="scribunto-error">דאטום פעלער: '..res..'</span>[[קאטעגאריע:בלעטער מיט דאטום פעלערן]]' | ||
end | end | ||
| שורה 1,011: | שורה 1,011: | ||
end | end | ||
Date[' | Date['רעכן'] = parseStrDateSafe; | ||
Date[' | Date['רעכן אפשטאנד'] = parseDateRangeSafe; | ||
Date['parseDateRange'] = parseDateRange; | Date['parseDateRange'] = parseDateRange; | ||
Date['מקושר'] = linkStrDateUnsafe; | Date['מקושר'] = linkStrDateUnsafe; | ||
return Date | return Date | ||
רעדאגירונגען