Zeller's Congruence - Formula

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:

    Beauty, like all other qualities presented to human experience, is relative; and the definition of it becomes unmeaning and useless in proportion to its abstractness. To define beauty not in the most abstract, but in the most concrete terms possible, not to find a universal formula for it, but the formula which expresses most adequately this or that special manifestation of it, is the aim of the true student of aesthetics.
    Walter Pater (1839–1894)

    “It’s hard enough to adjust [to the lack of control] in the beginning,” says a corporate vice president and single mother. “But then you realize that everything keeps changing, so you never regain control. I was just learning to take care of the belly-button stump, when it fell off. I had just learned to make formula really efficiently, when Sarah stopped using it.”
    Anne C. Weisberg (20th century)

    Given for one instant an intelligence which could comprehend all the forces by which nature is animated and the respective positions of the beings which compose it, if moreover this intelligence were vast enough to submit these data to analysis, it would embrace in the same formula both the movements of the largest bodies in the universe and those of the lightest atom; to it nothing would be uncertain, and the future as the past would be present to its eyes.
    Pierre Simon De Laplace (1749–1827)