אונטערשייד צווישן ווערסיעס פון "יחידה:אידישע דאטום"

חשוון > חשון
ק (rv)
(חשוון > חשון)
 
(14 מיטלסטע ווערסיעס פון 3 באַניצער נישט געוויזן.)
שורה 1: שורה 1:
mtable = {"ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני",
mtable = {"יאנואר", "פעברואר", "מערץ", "אפריל", "מאי", "יוני",
"יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר", }
"יולי", "אויגוסט", "סעפטעמבער", "אקטאבער", "נאוועמבער", "דעצעמבער", }


monthtable = {
monthtable = {
["תשרי"] = 7, ["חשוון"] = 8, ["כסלו"] = 9, ["טבת"] = 10,
["תשרי"] = 7, ["חשון"] = 8, ["כסלו"] = 9, ["טבת"] = 10,
["שבט"] = 11, ["אדר א'"] = 12, ["אדר ב'"] = 13, ["אדר"] = 13,
["שבט"] = 11, ["אדר א'"] = 12, ["אדר ב'"] = 13, ["אדר"] = 13,
["ניסן"] = 1, ["אייר"] = 2, ["סיוון"] = 3, ["תמוז"] = 4,
["ניסן"] = 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], 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 בF", gdate) .. "]] [["
then return "[[" .. frame:callParserFunction("#זמןמ:F j", gdate) .. "]] [["
.. year .. "]]" end
.. year .. "]]" end
return frame:callParserFunction("#זמןמ:j בF", gdate) .. " " .. year
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 = "א' ב" .. sub1(hdate, 10) end
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 .. "[[קאטעגאריע:בלעטער מיט דאטע גרייזן]]", 0)
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 "ב" .. ff == h2 then
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("א' בניסן " .. hyear, toyear)
ans = fromhebrewdate("א' ניסן " .. hyear, toyear)
if frame.args["exact"] ~= "כן"
if frame.args["exact"] ~= "כן"
then ans = ans .. "-" .. fromhebrewdate("א' בתשרי " .. hyear, toyear)
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('ט"ו ב' .. hdate, tomonth) end
then return fromhebrewdate('ט"ו ' .. hdate, tomonth) end
local date1 = fromhebrewdate("א' ב" .. hdate, same)
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, same)
date2 = fromhebrewdate("א' " .. date2, same)
date2 = same(date2 .. " - 1 days")
date2 = same(date2 .. " - 1 days")
local month2 = toonlymonth(date2)
local month2 = toonlymonth(date2)
שורה 381: שורה 387:
then return ifwhich(res)
then return ifwhich(res)
elseif frame.args["about"] == "כן" and
elseif frame.args["about"] == "כן" and
frame:expandTemplate({title = "גיל לערכי אישים/מקורב", args = {str = frame.args[1]}}) ~= ""
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 ב" .. wdate, frommonth) end
then return tohebrewdate("15 " .. wdate, frommonth) end
local date1 = tohebrewdate("1 ב" .. wdate, same)
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, same)
date2 = tohebrewdate("1 " .. date2, same)
date2 = same(date2 .. " - 1 days")
date2 = same(date2 .. " - 1 days")
local month2 = fromonlymonth(date2)
local month2 = fromonlymonth(date2)
שורה 520: שורה 526:
local habout = false
local habout = false
local wabout = false
local wabout = false
if frame:expandTemplate({title = "גיל לערכי אישים/מקורב", args = {str = hebrew}}) ~= ""
if frame:expandTemplate({title = "עלטער/מקורב", args = {str = hebrew}}) ~= ""
then hebrew = ""
then hebrew = ""
habout = true end
habout = true end
if frame:expandTemplate({title = "גיל לערכי אישים/מקורב", args = {str = world}}) ~= ""
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 = "גיל לערכי אישים/מקורב", args = {str = wdate}}) ~= ""
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