Method and source check
Last checked:
Automated source and implementation review, including worked examples and documented numerical limits. This review does not provide professional advice or specialist approval.
Method
Validate Gregorian YYYY-MM-DD civil dates and compare them in UTC calendar arithmetic. For a negative day component, repeatedly borrow days from preceding months; next-birthday construction currently rolls February 29 to March 1 in nonleap years.
total days = UTC day ordinal(current) − UTC day ordinal(birth)
illustrative heartbeats = elapsed minutes × the hypothetical fixed rate of 70 beats/minute
Variables and units
- birthdate
- valid Gregorian calendar date
- current date
- valid Gregorian calendar date on or after birth
- age
- calendar years, months, days under a stated month-end policy
Worked example
From 31 January to 1 March 2020, the calculator shows 0 years, 0 months, 30 days; total elapsed days are also 30. For a 29 February birthday, the current next-birthday display rolls to 1 March in a nonleap year.
Limitations
The calendar breakdown uses integer years, months, and days with repeated previous-month borrowing when needed; total elapsed days are integer UTC civil days. Displayed hours, minutes, and illustrative heartbeats are day-count multiples.
- The month-end breakdown uses repeated previous-month borrowing, a convention that may differ from other age calculators.
- For February 29 births, this calculator uses March 1 as the next birthday in nonleap years, as confirmed by the owner on 2026-09-28. This is a calculator convention, not a legal age rule.
- The fixed 70-beats-per-minute figure is illustrative, not a personal measurement; the result does not establish medical or legal eligibility.
- MDN documents JavaScript date handling, not this calculator’s month-borrowing or birthday convention. Those choices are defined by the implementation and its regression cases; the American Heart Association reference provides context on variable heart rates, not support for a fixed lifetime rate.
- 2024-02-30 is rejected as an invalid calendar date.
- 2020-01-31 to 2020-03-01 → 0 years, 0 months, 30 days.
- 2024-02-29 to 2025-02-28 → next birthday 2025-03-01 under current behavior.
- 2000-01-01 to 2025-01-01 gives the same result in UTC and America/Maceio.