https://github.com/ajcr/doomsday
Algorithms to compute the day of the week from a given date (Conway's Doomsday Rule, Sakamoto's method, Zeller's congruence)
https://github.com/ajcr/doomsday
dates doomsday-algorithm zeller-congruence
Last synced: 2 months ago
JSON representation
Algorithms to compute the day of the week from a given date (Conway's Doomsday Rule, Sakamoto's method, Zeller's congruence)
- Host: GitHub
- URL: https://github.com/ajcr/doomsday
- Owner: ajcr
- License: mit
- Created: 2019-01-01T17:13:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-05T13:22:14.000Z (over 6 years ago)
- Last Synced: 2025-02-15T20:27:53.990Z (4 months ago)
- Topics: dates, doomsday-algorithm, zeller-congruence
- Language: J
- Homepage:
- Size: 3.91 KB
- Stars: 7
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```