Skip to content
/ doomsday Public

Algorithms to compute the day of the week from a given date (Conway's Doomsday Rule, Sakamoto's method, Zeller's congruence)

License

Notifications You must be signed in to change notification settings

ajcr/doomsday

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

doomsday

A collection of methods to compute the day of the week for any date in the Gregorian calendar.

Currently includes:

  • Conway's Doomsday Algorithm
  • Zeller's Congruence
  • Sakamoto's Method

Usage

To run the scripts you must have a J interpreter installed (the scripts look for /usr/bin/ijconsole so adjust this as necessary).

Clone this repository (or download any of scripts you want). Make sure the scripts are executable (i.e. chmod +x [script]).

Execute a script with the date passed as three integer arguments of the form YYYY MM DD. For example:

$ ./doomsday.ijs 1999 12 31
Friday

$ ./zeller.ijs 2080 2 29    
Thursday

About

Algorithms to compute the day of the week from a given date (Conway's Doomsday Rule, Sakamoto's method, Zeller's congruence)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages