Jump to content

Doomsday rule: Difference between revisions

m
Line 84:
# Conway's doomsday algorithm
c, r = divrem(year, 100)
s, t = divrem(r, 12)
canchor = (5 * (c % 4) + 2) % 7 # anchor for century
doomsdaycanchor = ((r5 ÷ 12) +* (rc % 124) + ((r2) % 12)7 ÷ 4)# +anchor canchor)for % 7centiry
doomsday = (s + t + (t ÷ 4) + canchor) % 7
anchorday = (year % 4 != 0) || (r == 0 && year % 400 == 0) ? # leap year determination
nonleapyear_firstdoomsdays[month] : leapyear_firstdoomsdays[month]
4,108

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.