Using Simple Linear Models with Truncation to Determine the Gregorian Day of the Week
Bryce Iversen

TL;DR
This paper introduces a new algorithm for calculating the day of the week for any Gregorian date using simple linear models with truncation, eliminating the need for lookup tables or relabeling, thus enhancing computational simplicity and efficiency.
Contribution
The novel algorithm employs linear regression with truncation to accurately determine weekdays without relying on stored tables or re-labeling, improving ease of implementation.
Findings
Accurately computes weekdays for any Gregorian date.
Eliminates the need for lookup tables or relabeling.
Maintains high accuracy with simple linear models.
Abstract
The Gregorian calendar -- first established for daily use on Friday, October 15th, 1582 by Pope Gregory XIII in Catholic countries -- is presently the most pervasive calendar in the world. As such, algorithms for performing various calendrical computations in accurate, performant, and easily implementable ways are extremely useful in fields like software engineering. In this paper, we present a novel algorithm for determining the day of the week for any date in the Gregorian calendar. Of note, our algorithm does not rely on remembering tables of values. Instead, we encode tables needed for computation using simple linear regression with truncation to adjust for any errors present in our linear models in such a way that no tables have to be recalled. In addition, our algorithm does not require a relabeling of days, weeks, months, or years to values other than their intuitive…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsHistorical Astronomy and Related Studies · Time Series Analysis and Forecasting · Data Analysis with R
