Calendar
We use the Gregorian calendar for dates from 1583 to 9999. Earlier dates are not supported, because countries switched from the Julian calendar at different times from October 1582 onwards.
Days between two dates
- We count the days after the start date, up to and including the end date. This equals subtracting the dates.
- “Count both dates” also counts the start date and adds one day.
- Weeks are the days divided by 7, shown as full weeks and remaining days.
- Months are counted when the same day of the month comes round again; if that day does not exist, the last day of the month counts. Remaining days are shown separately.
Applies to: Days Between Dates, Weeks Between Dates, Months Between Dates.
Adding and subtracting
- Years and months are applied first, then weeks and days.
- If the day does not exist in the target month, the result is the last day of that month (January 31 + 1 month = February 28 or 29).
- Repeated dates are each measured from the original start date, so month ends do not drift.
Applies to: Add or Subtract Days, Days From Today, Days Ago.
Business days
- The default working days are Monday to Friday. You can choose any other set of days.
- Adding business days starts counting the day after the start date. Counting business days uses the same span as counting days.
- Holidays you add only change the result when they fall on a working day.
- Public holidays only count when you add them, because they differ by country and region.
- US federal holidays are the eleven in 5 U.S.C. 6103, from 1971 on. A holiday on a Saturday moves to the Friday before and one on a Sunday to the Monday after, the days federal offices close. Inauguration Day, a holiday only around Washington, D.C., and one-off closures are not included.
- UK bank holidays follow gov.uk for England and Wales, Scotland and Northern Ireland, from 2000 on, including one-off holidays such as jubilees. A bank holiday on a weekend moves to the next weekday that is not already a bank holiday.
Applies to: Business Days Calculator.
Week numbers and days of the year
- ISO 8601 weeks start on Monday, and week 1 is the week that contains the year's first Thursday.
- US week numbers start on Sunday, and week 1 is the week that contains January 1.
- Day of the year counts January 1 as day 1.
Applies to: Add or Subtract Days, Days From Today.
Today and time zones
“Today” is the date on your device, in your time zone. Pages are first delivered with today's date in UTC and your browser corrects it as soon as the page loads. Countdowns that include hours follow your time zone or the one you choose, including daylight saving time.
Applies to: Days Until a Date, Days Since a Date, Days Left in the Year, Countdown Timer.
Ages and holidays
- Age is counted in completed years, months and days. For people born on February 29, February 28 is the birthday in common years.
- Western Easter uses the Gregorian computus; Orthodox Easter uses the Julian computus, converted to the Gregorian calendar.
- Lunar New Year uses published dates for 2025 to 2033.
Applies to: Age Calculator, Days Until a Date.
How we test
Before every build, an automated test suite checks the date math, including:
- 20,000 random dates from 1583 to 9999, converted and compared with the reference date functions built into JavaScript, including the day of the week;
- 5,000 random periods, checking that months-and-days results add back up to the end date;
- 3,000 random business-day sums with different working weeks and holidays, checking that counting gives back the same number;
- known cases for leap years, month ends, ISO weeks at year boundaries and Easter dates.
Corrections
When a result turns out to be wrong, we fix it and list the correction here with its date.
No corrections so far.
Found something that looks wrong? Report a wrong result.