Doomsday Rule - Computer Formula For The Doomsday of A Year

Computer Formula For The Doomsday of A Year

For computer use, the following formulas for the Doomsday of a year are convenient.

For the Gregorian calendar:

For example, the year 2009 has a doomsday of Saturday under the Gregorian calendar (the currently accepted calendar), since

For the Julian calendar:

The formulas apply also for the proleptic Gregorian calendar and the proleptic Julian calendar. They use the floor function and astronomical year numbering for years BC.

For comparison, see the calculation of a Julian day number.

Read more about this topic:  Doomsday Rule

Famous quotes containing the words computer, formula, doomsday and/or year:

    The Buddha, the Godhead, resides quite as comfortably in the circuits of a digital computer or the gears of a cycle transmission as he does at the top of a mountain or in the petals of a flower.
    Robert M. Pirsig (b. 1928)

    Ideals possess the strange quality that if they were completely realized they would turn into nonsense. One could easily follow a commandment such as “Thou shalt not kill” to the point of dying of starvation; and I might establish the formula that for the proper functioning of the mesh of our ideals, as in the case of a strainer, the holes are just as important as the mesh.
    Robert Musil (1880–1942)

    Even an attorney of moderate talent can postpone doomsday year after year, for the system of appeals that pervades American jurisprudence amounts to a legalistic wheel of fortune, a game of chance, somewhat fixed in the favor of the criminal, that the participants play interminably.
    Truman Capote (1924–1984)

    Tomorrow in the offices the year on the stamps will be altered;
    Tomorrow new diaries consulted, new calendars stand;
    With such small adjustments life will again move forward
    Implicating us all; and the voice of the living be heard:
    “It is to us that you should turn your straying attention;
    Us who need you, and are affected by your fortune;
    Us you should love and to whom you should give your word.”
    Philip Larkin (1922–1986)