Skip to content

Gets the day of the week for any date in the Gregorian calendar, using John Conway's Doomsday rule

License

Notifications You must be signed in to change notification settings

haywalk/doomsday

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Conway's Doomsday Algorithm

This is a little program I wrote that takes in a date in ISO 8601 format (YYYY-MM-DD) and prints out the day of the week on that date.

It uses John Horton Conway's Doomsday rule to find the day of the week, by first calculating the 'anchor day' for the given century, then that of the given year, then finding the given day's offset from the first doomsday of the month, which is its offset from the year's anchor day.

This program is written in C. It is licensed under the GNU GPL, version 3. It was written by Hayden Walker (www.haywalk.ca), originally on 2021-12-15 in Python 3, then re-written in C on 2022-01-11.

About

Gets the day of the week for any date in the Gregorian calendar, using John Conway's Doomsday rule

Topics

Resources

License

Stars

Watchers

Forks

Languages