English

Calculating the day of the week: null-days algorithm

History and Overview 2014-04-10 v1

Abstract

In this paper, we propose a new algorithm of calculating the day of the week for any given century, year, month and day in Gregorian calendar. We provide two simple formulas to convert the century and the year into two integers. Then we introduce a list of null-days to transform the month and the day into another integer. Adding these three integers together and calculating the sum's residue modulo 77 gives a number between 00 and 66, which corresponds to Sunday until Saturday. Slight modification is needed if we have a leap year and the given month is either January or February. Our null-days algorithm is simple enough to be done by mental calculation, and the list of null-days has memorable patterns.

Cite

@article{arxiv.1404.2510,
  title  = {Calculating the day of the week: null-days algorithm},
  author = {Xiang-Sheng Wang},
  journal= {arXiv preprint arXiv:1404.2510},
  year   = {2014}
}
R2 v1 2026-06-22T03:47:02.755Z