מייבאים כמותיים, בדוקי עריכות אוטומטית, ביוראקראטן, אינטערפעיס רעדאקטארן, emailconfirmed, אינטערפעיס אדמיניסטראַטאָרן, מנטרים, סיסאפן, צוות טכני, מייבאים, מעדכנים, אספקלריה רעדאקטארן
102,362
רעדאגירונגען
(שחזור עמוק לגרסה של יגאל. קודם מנסים בטיוטה ואחר כך מעבירים. הגרסה הקיימת יוצרת שגיאות בערכים.) |
(חשוון > חשון) |
||
| (15 מיטלסטע ווערסיעס פון 4 באַניצער נישט געוויזן.) | |||
| שורה 1: | שורה 1: | ||
mtable = {" | mtable = {"יאנואר", "פעברואר", "מערץ", "אפריל", "מאי", "יוני", | ||
"יולי", " | "יולי", "אויגוסט", "סעפטעמבער", "אקטאבער", "נאוועמבער", "דעצעמבער", } | ||
monthtable = { | monthtable = { | ||
["תשרי"] = 7, [" | ["תשרי"] = 7, ["חשון"] = 8, ["כסלו"] = 9, ["טבת"] = 10, | ||
["שבט"] = 11, ["אדר א'"] = 12, ["אדר ב'"] = 13, ["אדר"] = 13, | ["שבט"] = 11, ["אדר א'"] = 12, ["אדר ב'"] = 13, ["אדר"] = 13, | ||
["ניסן"] = 1, ["אייר"] = 2, [" | ["ניסן"] = 1, ["אייר"] = 2, ["סיון"] = 3, ["תמוז"] = 4, | ||
["אב"] = 5, ["אלול"] = 6, | ["אב"] = 5, ["אלול"] = 6, | ||
} | } | ||
typomonthtable = {[" | typomonthtable = { | ||
["חשוון"] = "חשון", | |||
["כסליו"] = "כסלו", | |||
["סיוון"] = "סיון", | |||
["מרחשון"] = "חשון", | |||
["מרחשוון"] = "חשון", | |||
["מר-חשוון"] = "חשון", | |||
["מנחם אב"] = "אב", | |||
["מנחם-אב"] = "אב", | |||
["שבט (חודש)|שבט"] = "שבט", | |||
["שבט (חודש)"] = "שבט", | |||
} | } | ||
| שורה 51: | שורה 57: | ||
function mindate(fix) | function mindate(fix) | ||
local indenttable = {176, 206, 235, 265, 294, 324, 0, 30, 59, 88, 117, 147, 147} | local indenttable = {176, 206, 235, 265, 294, 324, 0, 30, 59, 88, 117, 147, 147} | ||
return same("28-08-" .. takeyear(fix[3]) .. " + " .. (indenttable[monthtable[sub1(fix[2], | return same("28-08-" .. takeyear(fix[3]) .. " + " .. (indenttable[monthtable[sub1(fix[2], 1)]] | ||
+ hebnum(fix[1]) - 1) .. " days") | + hebnum(fix[1]) - 1) .. " days") | ||
end | end | ||
| שורה 151: | שורה 157: | ||
local year = makeyear(gdate) | local year = makeyear(gdate) | ||
if frame.args["links"] == "yes" | if frame.args["links"] == "yes" | ||
then return "[[" .. frame:callParserFunction("#זמןמ:j | then return "[[" .. frame:callParserFunction("#זמןמ:F j", gdate) .. "]] [[" | ||
.. year .. "]]" end | .. year .. "]]" end | ||
return frame:callParserFunction("#זמןמ:j | return frame:callParserFunction("#זמןמ:F j", gdate) .. " " .. year | ||
end | end | ||
| שורה 196: | שורה 202: | ||
local hdate = fixmonth(hdate1) | local hdate = fixmonth(hdate1) | ||
if 1 == find1(hdate, "ראש חודש") | if 1 == find1(hdate, "ראש חודש") | ||
then hdate = "א' | then hdate = "א' " .. sub1(hdate, 10) end | ||
local h1, h2, h3 = parts(hdate) | local h1, h2, h3 = parts(hdate) | ||
--[=[ | --[=[ | ||
| שורה 230: | שורה 236: | ||
function aserror(message) | function aserror(message) | ||
error(message .. "[[ | error(message .. "[[קאטעגאריע:בלעטער מיט דאטום פעלערן]]", 0) | ||
end | end | ||
| שורה 240: | שורה 246: | ||
local h3 = sub1(wdate, s2 + 1, len1(wdate)) | local h3 = sub1(wdate, s2 + 1, len1(wdate)) | ||
for f, ff in pairs(mtable) do | for f, ff in pairs(mtable) do | ||
if | if ff == h2 then | ||
return h1 .. "-" .. frame:callParserFunction("padleft", {f, 2}) | return h1 .. "-" .. frame:callParserFunction("padleft", {f, 2}) | ||
.. "-" .. frame:callParserFunction("padleft", {h3, 4}) end | .. "-" .. frame:callParserFunction("padleft", {h3, 4}) end | ||
| שורה 289: | שורה 295: | ||
function fromhebrewyear(hyear) | function fromhebrewyear(hyear) | ||
ans = fromhebrewdate("א' | ans = fromhebrewdate("א' ניסן " .. hyear, toyear) | ||
if frame.args["exact"] ~= "כן" | if frame.args["exact"] ~= "כן" | ||
then ans = ans .. "-" .. fromhebrewdate("א' | then ans = ans .. "-" .. fromhebrewdate("א' תשרי " .. hyear, toyear) | ||
end | end | ||
return ans | return ans | ||
| שורה 298: | שורה 304: | ||
function fromhebrewmonth(hdate) | function fromhebrewmonth(hdate) | ||
if frame.args["exact"] == "כן" | if frame.args["exact"] == "כן" | ||
then return fromhebrewdate('ט"ו | then return fromhebrewdate('ט"ו ' .. hdate, tomonth) end | ||
local date1 = fromhebrewdate("א' | local date1 = fromhebrewdate("א' " .. hdate, same) | ||
local month1 = toonlymonth(date1) | local month1 = toonlymonth(date1) | ||
local year1 = toyear(date1) | local year1 = toyear(date1) | ||
local date2 = same(date1 .. " + 30 days") | local date2 = same(date1 .. " + 30 days") | ||
date2 = frommonth(date2) | date2 = frommonth(date2) | ||
date2 = fromhebrewdate("א' | date2 = fromhebrewdate("א' " .. date2, same) | ||
date2 = same(date2 .. " - 1 days") | date2 = same(date2 .. " - 1 days") | ||
local month2 = toonlymonth(date2) | local month2 = toonlymonth(date2) | ||
| שורה 364: | שורה 370: | ||
frame = f | frame = f | ||
which = false | which = false | ||
local success, res = pcall(pick1, frame.args[1], frame.args[2], "[[ | local success, res = pcall(pick1, frame.args[1], frame.args[2], "[[קאטעגאריע:חוסר מתאם בין תאריך עברי לתאריך לועזי]]") | ||
if not success | if not success | ||
then res = "" end | then res = "" end | ||
| שורה 381: | שורה 387: | ||
then return ifwhich(res) | then return ifwhich(res) | ||
elseif frame.args["about"] == "כן" and | elseif frame.args["about"] == "כן" and | ||
frame:expandTemplate({title = " | frame:expandTemplate({title = "עלטער/מקורב", args = {str = frame.args[1]}}) ~= "" | ||
then return ifwhich(frame.args[1], "[[ | then return ifwhich(frame.args[1], "[[קאטעגאריע:בלעטער מיט תאריך עברי מקורב]]") | ||
elseif frame.args["error"] == nil | elseif frame.args["error"] == nil | ||
then return aserror(res) end | then return aserror(res) end | ||
| שורה 398: | שורה 404: | ||
function tohebrewmonth(wdate) | function tohebrewmonth(wdate) | ||
if frame.args["exact"] == "כן" | if frame.args["exact"] == "כן" | ||
then return tohebrewdate("15 | then return tohebrewdate("15 " .. wdate, frommonth) end | ||
local date1 = tohebrewdate("1 | local date1 = tohebrewdate("1 " .. wdate, same) | ||
local month1 = fromonlymonth(date1) | local month1 = fromonlymonth(date1) | ||
local year1 = fromyear(date1) | local year1 = fromyear(date1) | ||
local date2 = same(date1 .. " + 31 days") | local date2 = same(date1 .. " + 31 days") | ||
date2 = tomonth(date2) | date2 = tomonth(date2) | ||
date2 = tohebrewdate("1 | date2 = tohebrewdate("1 " .. date2, same) | ||
date2 = same(date2 .. " - 1 days") | date2 = same(date2 .. " - 1 days") | ||
local month2 = fromonlymonth(date2) | local month2 = fromonlymonth(date2) | ||
| שורה 486: | שורה 492: | ||
if cat ~= nil | if cat ~= nil | ||
then if ht == "dmy" and wt ~= "dmy" | then if ht == "dmy" and wt ~= "dmy" | ||
then return "[[ | then return "[[קאטעגאריע:חוסר מתאם בתאריכים - תאריך " | ||
.. frame.args["type"] .. " עברי מדויק]]" end | .. frame.args["type"] .. " עברי מדויק]]" end | ||
if ht ~= "dmy" and wt == "dmy" | if ht ~= "dmy" and wt == "dmy" | ||
then return "[[ | then return "[[קאטעגאריע:חוסר מתאם בתאריכים - תאריך " | ||
.. frame.args["type"] .. " לועזי מדויק]]" end | .. frame.args["type"] .. " לועזי מדויק]]" end | ||
-- if ht == "dmy" or ht == "my" or ht == "y" | -- if ht == "dmy" or ht == "my" or ht == "y" | ||
-- then return "[[ | -- then return "[[קאטעגאריע:חוסר מתאם בתאריכים - תאריך " | ||
-- .. frame.args["type"] .. " לועזי מדויק]]" end | -- .. frame.args["type"] .. " לועזי מדויק]]" end | ||
return "" end | return "" end | ||
| שורה 520: | שורה 526: | ||
local habout = false | local habout = false | ||
local wabout = false | local wabout = false | ||
if frame:expandTemplate({title = " | if frame:expandTemplate({title = "עלטער/מקורב", args = {str = hebrew}}) ~= "" | ||
then hebrew = "" | then hebrew = "" | ||
habout = true end | habout = true end | ||
if frame:expandTemplate({title = " | if frame:expandTemplate({title = "עלטער/מקורב", args = {str = world}}) ~= "" | ||
then world = "" | then world = "" | ||
wabout = true end | wabout = true end | ||
| שורה 543: | שורה 549: | ||
then return res | then return res | ||
elseif frame.args["about"] == "כן" and | elseif frame.args["about"] == "כן" and | ||
frame:expandTemplate({title = " | frame:expandTemplate({title = "עלטער/מקורב", args = {str = wdate}}) ~= "" | ||
then return ifwhich(frame.args[1], "[[ | then return ifwhich(frame.args[1], "[[קאטעגאריע:בלעטער מיט תאריך מקורב]]") | ||
elseif frame.args["error"] == nil | elseif frame.args["error"] == nil | ||
then return aserror(res) end | then return aserror(res) end | ||
רעדאגירונגען