יחידה:תאריך עברי: הבדלים בין גרסאות בדף
אין תקציר עריכה |
אין תקציר עריכה |
||
| שורה 49: | שורה 49: | ||
local count = 0 | local count = 0 | ||
local ans | local ans | ||
local greg | |||
while (count < 82) do | while (count < 82) do | ||
ans = mindate .. " + " .. count .. " days" | ans = mindate .. " + " .. count .. " days" | ||
if (from(ans, frame) == hdate) then | if (from(ans, frame) == hdate) then | ||
greg = same(ans, frame) | |||
return to1( | greg = same(greg .. " - ".. diff(greg) .. "days", frame) | ||
checkcasp(greg) | |||
return to1(greg, frame) end | |||
count = count + 1 | count = count + 1 | ||
end | end | ||
| שורה 122: | שורה 125: | ||
end | end | ||
function diff( | function diff(gdate) | ||
local ans | local ans | ||
local wdate = numtonums( | local wdate = numtonums(gdate) | ||
local wday = wdate[1] | local wday = wdate[1] | ||
local wmonth = wdate[2] | local wmonth = wdate[2] | ||
| שורה 138: | שורה 141: | ||
then ans = ans - 1 end | then ans = ans - 1 end | ||
end end | end end | ||
return | return ans | ||
end | end | ||