Formula
For the Gregorian calendar, Zeller's congruence is
for the Julian calendar it is
where
- h is the day of the week (0 = Saturday, 1 = Sunday, 2 = Monday, ...)
- q is the day of the month
- m is the month (3 = March, 4 = April, 5 = May, ..., 14 = February)
- K the year of the century .
- J is the century (actually ) (For example, in 1995 the century would be 19, even though it was the 20th century.)
NOTE: In this algorithm January and February are counted as months 13 and 14 of the previous year. E.g. if it is February 2, 2010, the algorithm counts the date as the second day of the fourteenth month of 2009 (02/14/2009 in DD/MM/YYYY format)
For an ISO week date Day-of-Week d (1 = Monday to 7 = Sunday), use
Read more about this topic: Zeller's Congruence
Famous quotes containing the word formula:
“In the most desirable conditions, the child learns to manage anxiety by being exposed to just the right amounts of it, not much more and not much less. This optimal amount of anxiety varies with the childs age and temperament. It may also vary with cultural values.... There is no mathematical formula for calculating exact amounts of optimal anxiety. This is why child rearing is an art and not a science.”
—Alicia F. Lieberman (20th century)
“But suppose, asks the student of the professor, we follow all your structural rules for writing, what about that something else that brings the book alive? What is the formula for that? The formula for that is not included in the curriculum.”
—Fannie Hurst (18891968)
“My formula for greatness in human beings is amor fati: that one wants to change nothing, neither forwards, nor backwards, nor in all eternity. Not merely to endure necessity, still less to hide itall idealism is mendacity in the face of necessitybut rather to love it.”
—Friedrich Nietzsche (18441900)