מייבאים כמותיים, בדוקי עריכות אוטומטית, ביוראקראטן, אינטערפעיס רעדאקטארן, emailconfirmed, אינטערפעיס אדמיניסטראַטאָרן, מנטרים, סיסאפן, צוות טכני, מייבאים, מעדכנים, אספקלריה רעדאקטארן
102,362
רעדאגירונגען
(אפדעיט) צייכן: צוריקגעשטעלט |
(דיוק) |
||
| (8 מיטלסטע ווערסיעס פון 2 באַניצער נישט געוויזן.) | |||
| שורה 458: | שורה 458: | ||
return Date.new( definition ) | return Date.new( definition ) | ||
end | |||
local function extractNumbers(inputString) | |||
local numbers = inputString:match("^(%d+[%s%d-]*)") | |||
return numbers or "" | |||
end | end | ||
| שורה 476: | שורה 481: | ||
-- Remove footnotes & directionality markers | -- Remove footnotes & directionality markers | ||
wikitext = mw.text.killMarkers( wikitext ) | wikitext = mw.text.killMarkers( wikitext ) | ||
wikitext = mw.ustring.gsub(wikitext, "‏", "") | wikitext = mw.ustring.gsub(wikitext, "‏","") | ||
wikitext = mw.ustring.gsub(wikitext, "‎", "") | wikitext = mw.ustring.gsub(wikitext, "‎","") | ||
wikitext = mw.ustring.gsub(wikitext, " | wikitext = mw.ustring.gsub(wikitext, ",","") | ||
-- BC to minus | -- BC to minus | ||
wikitext = mw.ustring.gsub( wikitext, "([0-9]+) לפנה[\"״]ס" , "-%1") | wikitext = mw.ustring.gsub( wikitext, "([0-9]+) לפנה[\"״]ס" , "-%1") | ||
wikitext = mw.ustring.gsub( wikitext, "([0-9]+) אא[\"״]ר" , "-%1") | |||
wikitext = mw.ustring.gsub( wikitext, "([0-9]+) בצ[\"״]ר" , "-%1") | |||
wikitext = mw.ustring.gsub( wikitext, "([0-9]+) פד[\"״]צ" , "-%1") | |||
if mw.ustring.match(wikitext, '^המאה ה[־-]%d+$') then | if mw.ustring.match(wikitext, '^המאה ה[־-]%d+$') then | ||
local yearStr = mw.ustring.match(wikitext, '^המאה ה[־-](%d+)$') | local yearStr = mw.ustring.match(wikitext, '^המאה ה[־-](%d+)$') | ||
return Date.new( { year=tonumber(yearStr)*100, month=0, day=0, precision= Date.PRECISION.YEAR100 } ) | |||
end | |||
if mw.ustring.match(wikitext, "%d+['ס]?ט[ען]ר? י") then | |||
local yearStr = mw.ustring.match(wikitext, "(%d+)['ס]?ט[ען]ר? י") | |||
return Date.new( { year=tonumber(yearStr)*100, month=0, day=0, precision= Date.PRECISION.YEAR100 } ) | return Date.new( { year=tonumber(yearStr)*100, month=0, day=0, precision= Date.PRECISION.YEAR100 } ) | ||
end | end | ||
| שורה 819: | שורה 832: | ||
-- remove footnotes | -- remove footnotes | ||
dateRangeStr = mw.text.killMarkers(dateRangeStr) | dateRangeStr = mw.text.killMarkers(dateRangeStr) | ||
dateRangeStr = mw.ustring.gsub(dateRangeStr, "‏", "") | dateRangeStr = mw.ustring.gsub(dateRangeStr, "‏","") | ||
local outputPrefix = '' | local outputPrefix = '' | ||
| שורה 829: | שורה 841: | ||
local t1 = Date.newFromWikitext( parts[1] ) | local t1 = Date.newFromWikitext( parts[1] ) | ||
local t2 | local t2 | ||
local useCurrent = #parts<2 or (parts[2] == ' | local useCurrent = #parts<2 or (parts[2] == 'היינט' or parts[2]=='הווה' or parts[2]=='אנגייענד' or parts[2]=='איצט') | ||
if not useCurrent then | if not useCurrent then | ||
| שורה 959: | שורה 971: | ||
str= mw.ustring.gsub(str,"כ(.+)","%1"); | str= mw.ustring.gsub(str,"כ(.+)","%1"); | ||
str= mw.ustring.gsub(str,"־(.+)","%1"); | str= mw.ustring.gsub(str,"־(.+)","%1"); | ||
str= mw.ustring.gsub(str," | str= mw.ustring.gsub(str," יאָרן","") | ||
if str == "שנתיים" then | if str == "שנתיים" then | ||
str = 2 | str = 2 | ||
| שורה 966: | שורה 978: | ||
str = 1 | str = 1 | ||
end | end | ||
str = mw.ustring.gsub(str," | str = mw.ustring.gsub(str," יאָר", "") | ||
if tonumber(str) > 0 and | |||
tonumber(parseDateRange(frame.args[1], "raw", inclusive)) < 0 then | |||
str = -1 * str | str = -1 * str | ||
end | end | ||
רעדאגירונגען