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

אין תקציר עריכה
מ 197 גרסאות של הדף wikipedia:he:יחידה:תאריך_עברי יובאו
 
(22 גרסאות ביניים של 5 משתמשים אינן מוצגות)
שורה 23: שורה 23:


function find1(str, what, where)
function find1(str, what, where)
local ans = mw.ustring.find(str, what, where, true)
return mw.ustring.find(str, what, where, true) or 0
if (ans == nil) then
ans = 0 end
return ans
end
end


שורה 79: שורה 76:
greg = same(greg .. " - ".. diffs .. "days")
greg = same(greg .. " - ".. diffs .. "days")
checkcasp(greg)
checkcasp(greg)
if makeformat then
return frame:callParserFunction("#זמןמ:" .. makeformat, greg)
end
return format(greg) end
return format(greg) end
count = count + 1
count = count + 1
שורה 142: שורה 142:
function makeyear(gdate)
function makeyear(gdate)
local year = frame:callParserFunction("#זמןמ:Y", gdate)
local year = frame:callParserFunction("#זמןמ:Y", gdate)
if tonumber(year) < 1000
if tonumber(year) < 1000 and which
then year = sub1(year, 2)
then year = sub1(year, 2)
end
end
שורה 153: שורה 153:
then return "[[" .. frame:callParserFunction("#זמןמ:j בF", gdate) .. "]] [["
then return "[[" .. frame:callParserFunction("#זמןמ:j בF", gdate) .. "]] [["
.. year .. "]]" end
.. year .. "]]" end
return frame:callParserFunction("#זמןמ:j בF ", gdate) .. year
return frame:callParserFunction("#זמןמ:j בF", gdate) .. " " .. year
end
end


שורה 161: שורה 161:
then return "[[" .. frame:callParserFunction("#זמןמ:F", gdate) .. "]] [["
then return "[[" .. frame:callParserFunction("#זמןמ:F", gdate) .. "]] [["
.. year .. "]]" end
.. year .. "]]" end
return frame:callParserFunction("#זמןמ:F ", gdate) .. year
return frame:callParserFunction("#זמןמ:F", gdate) .. " " .. year
end
end


שורה 352: שורה 352:
function fromhebrew(f)
function fromhebrew(f)
which = true
which = true
return fromhebrewandverify(f)
end
function fromhebrewformat(f)
which = true
makeformat = f.args["format"]
return fromhebrewandverify(f)
return fromhebrewandverify(f)
end
end
שורה 489: שורה 495:
-- .. frame.args["type"] .. " לועזי מדויק]]" end
-- .. frame.args["type"] .. " לועזי מדויק]]" end
return "" end
return "" end
if hsuccess and wsuccess
if wsuccess and hsuccess
then if ht == "dmy" then return hdw
then if wt == "dmy" then return wdate
elseif wt == "dmy" then return wdate
elseif ht == "dmy" then return hdw
elseif wt == "my" then return wdate
elseif ht == "my" then return hdw
elseif ht == "my" then return hdw
elseif wt == "my" then return wdate
elseif wt == "y" then return wdate
elseif ht == "y" then return hdw
else return hdw end
else return wdate end
elseif wsuccess then return wdate
elseif hsuccess then return hdw
elseif hsuccess then return hdw
elseif wsuccess then return wdate
elseif wt == "about" then return wdate
elseif ht == "about" then return hdate
else return hdate end
else return wdate end
end
end


שורה 605: שורה 611:
end
end


return {fromhebrew = fromhebrew, tohebrew = tohebrew, verify = verify, pick = pick, samedate = samedate}
return {fromhebrew = fromhebrew, tohebrew = tohebrew, verify = verify, pick = pick, samedate = samedate,
fromhebrewformat = fromhebrewformat}