How to Use the Day Counter
To use the day counter, use the drop-down menus to select a starting month, date, and year. Check the "include end day" box if the end day should be included in the count. For example, if a project is due at 11:59 PM on April 24th, and the current day is March 29th, select those dates, and use the check box to include the end day. Alternatively, selecting April 25th as the end day and not checking the "include end day" box would provide the same result.
The calculator returns the number of days between the selected dates assuming a Monday to Friday work week and that the weekend falls on Saturday and Sunday. The calculator always counts the start date as a full day, and counts the last date as a full day if the "include end day" box is selected. If the box is not selected, the end date is not included in the calculation.
Counting Days From a Date
Given a start date and a selected number of days to add or subtract, the calculator will determine the resulting date. The "count business days only" checkbox determines whether or not the selected number of days includes weekends. For example, if the box is checked, the day selected is a Monday, and if 7 days were added to that, the calculator result will be Wednesday the following week, not Monday, since Saturday and Sunday would not be counted.
Day of the Week & The Doomsday Rule
The calculator also shows the day of the week for the chosen dates. There are many different algorithms for calculating the day of the week mentally. One of the most famous is the Doomsday rule, an algorithm developed by John Conway.
Doomsdays
The algorithm is based on "doomsdays," which are specific dates that all fall on a certain day of the week in a given year. These dates are the same for every year, but the day they all fall on changes with each year.
| Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1/3* | 2/28* | 3/14 | 4/4 | 5/9 | 6/6 | 7/11 | 8/8 | 9/5 | 10/10 | 11/7 | 12/12 |
*On a leap year, the doomsday for January is 1/4 instead of 1/3 and the doomsday for February is 2/29 instead of 2/28.
Anchor Days
The anchor day is the doomsday for a given century. The doomsday for a given year is calculated relative to the anchor day for the century. The Gregorian calendar cycles every 400 years. Thus, it is only necessary to memorize the anchor day for four centuries:
| 1900 | 2000 | 2100 | 2200 |
|---|---|---|---|
| Wednesday | Tuesday | Sunday | Friday |
The Algorithm Steps
To perform the algorithm, assign numbers to each day of the week (Sunday=0, Monday=1, Tuesday=2, Wednesday=3, Thursday=4, Friday=5, Saturday=6).
- Determine the anchor day for the given century; assign this to the variable a.
- Divide the last two digits in the year by 12; assign the result, ignoring any remainder, to b.
- Assign any remainder to c.
- Divide c by 4, ignoring any remainder; assign to d.
- Find the sum of a + b + c + d; assign the result to e.
- Subtract 7 from e until the result is 6 or less; assign the result to f. This represents the day on which doomsday falls in the given year.
- Determine the closest doomsday to the selected date.
- Count forward or back from the closest doomsday to the selected date to find the final day of the week.