How to calculate what day of the week it is for any date. Evar. Epic.
Century codes:
21st: -
20th: +1
19th: +3
18th: +5 or -2
17th: -
Calculate the year code.
two digit year is represented by x.
(x + x/4 (no modulus)) / 7 (modulus only)
Month codes:
January: 6
February: 2
March: 2
April: 5
May: 0
June: 3
July: 5
August: 1
September: 4
October: 6
November: 2
December: 4
(Century code + year code + month code) / 7 (modulus only)
add the date in the month, subtract 7 until less than 7 is left, and 0 or 7 is Sunday, 1 is Monday, 2 is Tuesday, 3 is Wednesday, 4 is Thursday, 5 is Friday, 6 is Saturday.
Thats awesome :)
mihassan 1 month ago