יחידה:תאריך עברי: הבדלים בין גרסאות בדף

אין תקציר עריכה
משתמש:IKhitron/טיוטה
שורה 256: שורה 256:
end
end


function fromhebrew1(hdate)
function fromhebrew1()
if hdate == "[[ה' אלפים]]" then if frame.args["exact"] ~= "כן"
if rem == "[[ה' אלפים]]" then if frame.args["exact"] ~= "כן"
then return ifwhich("1239-1240") else return ifwhich(1240) end end -- here
then return ifwhich("1239-1240") else return ifwhich(1240) end end -- here
local w, rem = findhdatetype(hdate)
local w, rem = findhdatetype(frame.args[1])
if w == "dmy"
if w == "dmy"
then return ifwhich(fromhebrewdate(rem, to))
then return ifwhich(fromhebrewdate(rem, to))
שורה 289: שורה 289:
if frame.args["about"] == "כן" and ifabout(frame.args[1])
if frame.args["about"] == "כן" and ifabout(frame.args[1])
then return ifwhich(frame.args[1], "[[קטגוריה:דפים עם תאריך עברי מקורב]]") end
then return ifwhich(frame.args[1], "[[קטגוריה:דפים עם תאריך עברי מקורב]]") end
local success, res = pcall(fromhebrew1(frame.args[1]))
local success, res = pcall(fromhebrew1)
if success
if success
then return ifwhich(res)
then return ifwhich(res)
שורה 372: שורה 372:


function pick1(hdate, wdate)
function pick1(hdate, wdate)
if hdate == nil
local wdatetype, wrem = findwdatetype(wdate)
then hdate = "" end
return wdatetype .. " " .. wrem
if wdate == nil
then wdate = "" end
local ht, hd = findhdatetype(hdate)
local wt, wd = findwdatetype(wdate)
if ht == "dmy" then return fromhebrew1(hd)
elseif wt == "dmy" then return wd
elseif ht == "my" then return fromhebrew1(hd)
elseif wt == "my" then return wd
elseif ht == "y" then return fromhebrew1(hd)
elseif wt == "y" then return wd
elseif ht == "about" then return hd
elseif wt == "about" then return wd
else return hd end
end
end