Technical date guide

Last reviewed: August 2026 ยท By Age in Days editorial desk

Most date-calculation mistakes come from letting software guess what the date means.

Reliable date tools validate calendar parts, choose a time basis, and state whether endpoints count before they subtract anything.

Invalid-date normalization

Many JavaScript constructors turn April 31 into May 1 instead of throwing an error. This site first verifies the ISO format, month range, day range, and reconstructed components, so impossible dates are rejected. That avoids a result for a date the user never entered.

UTC and daylight-saving traps

Date-only strings can be parsed as UTC and display a previous local date west of Greenwich. Raw millisecond subtraction can also produce 23- or 25-hour days around daylight-saving changes. The local calendar parts are normalized and converted to a UTC day serial only for stable day-boundary arithmetic.

Other frequent errors

JavaScript month indexes are zero-based in component constructors. Inclusive counting adds a day only when both endpoints count. Leap years have century exceptions. A year is not always 365 days. These errors can combine, so a seemingly small discrepancy can have several causes.

Reproducible check

Test 2024-02-28 to 2024-03-01 (two days), reject 2025-04-31, and test March 7 to March 9 across daylight-saving time (two calendar days). Use the calculator, compare why date calculators disagree, and read the methodology.