weekday


weekday, a C code which determines the day of the week corresponding to a given date.

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

weekday is available in a C version and a C++ version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.

Related Data and Programs:

weekday_test

analemma, a C code which evaluates the equation of time, a formula for the difference between the uniform 24 hour day and the actual position of the sun, by Brian Tung.

dates, a dataset directory which contains lists of dates in various calendar systems.

doomsday, a C code which is given the year, month and day of a date, and uses John Conway's doomsday algorithm to determine the corresponding day of the week.

test_values, a C code which supplies test values of various mathematical functions.

Reference:

  1. Lewis Carroll (Charles Dodgson),
    To Find the Day of the Week for Any Given Date,
    Nature, 31 March 1887.
  2. Gary Meisters,
    Lewis Carroll's Day-of-the-Week Algorithm,
    Math Horizons,
    November 2002, pages 24-25.
  3. Edward Reingold, Nachum Dershowitz,
    Calendrical Calculations: The Millennium Edition,
    Cambridge University Press, 2001,
    ISBN: 0-521-77752-6,
    LC: CE12.R45.
  4. Edward Richards,
    Mapping Time, The Calendar and Its History,
    Oxford, 1999,
    ISBN: 0-19-850413-6,
    LC: CE11.R5.

Source Code:


Last revised on 13 August 2019.