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

אין תקציר עריכה
אין תקציר עריכה
שורה 73: שורה 73:
count = count + 1
count = count + 1
end
end
error("Date not found")
error("Date not found", 0)
end
end


שורה 205: שורה 205:
if wnumbers[3] < 360 or wnumbers[3] > 4357 or
if wnumbers[3] < 360 or wnumbers[3] > 4357 or
(wnumbers[3] == 1582 and wnumbers[2] == 10 and wnumbers[1] > 4 and wnumbers[1] < 15)
(wnumbers[3] == 1582 and wnumbers[2] == 10 and wnumbers[1] > 4 and wnumbers[1] < 15)
then error("The date is not in the allowed casp") end
then error("The date is not in the allowed casp", 0) end
end
end


שורה 248: שורה 248:
elseif ht == "y"
elseif ht == "y"
then return ifwhich(fromhebrewyear(rem))
then return ifwhich(fromhebrewyear(rem))
else error("Wrong type: " .. ht) end
else error("Wrong type: " .. ht, 0) end
end
end


שורה 330: שורה 330:
local take = takenumbers(rem)
local take = takenumbers(rem)
if to(take) ~= rem
if to(take) ~= rem
then error("wrong date") end
then error("wrong date", 0) end
checkcasp(take)
checkcasp(take)
take = same(take .. " + " .. diff(take) .. " days")
take = same(take .. " + " .. diff(take) .. " days")
שורה 340: שורה 340:
then wdate = sub1(wdate, 1, 6) .. "0" .. sub1(wdate, 7, 9) end
then wdate = sub1(wdate, 1, 6) .. "0" .. sub1(wdate, 7, 9) end
if same(wdate) ~= wdate
if same(wdate) ~= wdate
then error("wrong date") end
then error("wrong date", 0) end
checkcasp(wdate)
checkcasp(wdate)
wdate = same(wdate .. " + " .. diff(wdate) .. " days")
wdate = same(wdate .. " + " .. diff(wdate) .. " days")
שורה 369: שורה 369:
elseif w == "y"
elseif w == "y"
then return tohebrewyear(rem)
then return tohebrewyear(rem)
else error("Wrong type: " .. ht) end
else error("Wrong type: " .. ht, 0) end
end
end