Dates, not timestamps
- Inputs are calendar dates in
YYYY-MM-DD form, from year 1 to 9999.
- A date that does not exist, such as February 29, 2026 or April 31, is rejected. It is never moved to a nearby valid date.
- Dates are compared as day numbers built from year, month, and day. Time of day, time zones, and daylight saving never affect a count.
- The Gregorian calendar applies to every year, including years before it was adopted. Historical Julian dates need converting first.
- "Today" is the date on your device. Countdown and next-birthday results refresh after local midnight.
Counting rules
| Mode | Main figure | Endpoint rule |
| Age on a date | Days from birth date to the reference date | Birth date is day 0 |
| Days between | Days from start to end | Start excluded. The inclusive count is shown alongside. |
| Countdown | Days from today to the target | 1 the day before, 0 on the day, then days since |
| Working days | Monday to Friday dates, minus selected holidays | Both dates included |
| Next birthday | Days from today to the next birthday | The birth date itself is not a birthday |
| Day milestone | Birth date plus the chosen number of days | Birth date is day 0 |
If the end date is before the start date, the span is reported as a positive number and the result notes the order.
Years, months, and days
The breakdown counts the largest number of whole months whose anniversary is not after the end date, then the remaining days. When the start day does not exist in a later month, that month's anniversary is its last day. So January 31 plus one month is February 28, or February 29 in a leap year.
Weeks are total days divided by 7, with the remainder shown. Hours and minutes are total days times 24 and times 1,440, labeled as approximate because no birth time is entered.
February 29 birthdays
In a common year, a February 29 birthday is placed on February 28. When the March 1 convention would give a different age or next birthday, the result adds a row labeled "If your rule uses March 1." The day total does not depend on the convention.
Working days and holidays
Working days are Monday to Friday dates in the range, both ends included, minus any holiday from the selected list that falls on one of those dates. Holidays are computed from their rules for 1978 to 2099. Years outside that range are counted without holiday adjustments, and the result says so.
- US federal holidays: the 11 holidays in 5 U.S.C. 6103, each from the year it began (Martin Luther King, Jr. Day from 1986, Juneteenth from 2021). Saturday holidays move to Friday and Sunday holidays to Monday. Inauguration Day and one-off executive closures are not included.
- UK bank holidays: England and Wales only. Easter is computed with the Gregorian Easter algorithm. New Year's Day, Christmas Day, and Boxing Day move to the next free weekday when they fall on a weekend. One-off and moved holidays since 1978 are listed by year in the code and on the UK page.
Holiday dates are checked against the GOV.UK bank holiday feed for 2019 to 2028 and against the open-source holidays library for every year from 1978 to 2099. A one-off holiday announced in the future appears only after the code is updated.
Shared links
Copy link puts the mode and inputs after the # in the address, for example #mode=age&from=1990-06-15&to=2026-10-14. When a shared link opens, the calculator reads those values, checks that each date exists, and then removes them from the address bar. Results that depend on today, such as countdowns, are calculated from the viewer's own date.
Reference tables
Tables on the holiday, working days, leap year, and milestone pages are written by a script that calls the same date module as the calculator. An automated check fails if a published table differs from what the code produces.
Testing
Automated tests cover invalid dates, the century leap year rule, month and year ends, daylight saving spans, reversed ranges, inclusive counts, birthdays and February 29, day milestones, holiday dates and substitute days, and working-day totals. Browser tests exercise the calculator at phone and desktop widths. When a rule changes, the change and its date are recorded in site updates.