time_age_calculator
Calculate exact age from a birth date to any reference date, or compute the years, months, and days between two dates. Get breakdowns, totals, and next birthday details.
Instructions
Age and Date-Span Calculator. Compute exact age or elapsed time from a birth date to a reference date (defaults to today, UTC), in proleptic-Gregorian calendar math. operation "compute" returns a years/months/days breakdown plus totals (months/weeks/days/hours/minutes/seconds), next-birthday details, the day of the week you were born, and decorative western/chinese zodiac; operation "yearsBetween" returns only the non-negative years/months/days/totalDays span between two dates. Use this for age and birthday math; use time_date_difference instead for business-day counts or for adding/subtracting a duration from a date. Runs locally via the same JS logic the page uses: read-only, non-destructive, offline-capable, rate-limited (60 req/min anonymous), no auth. Results are wrapped as operation plus data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | "compute": age/elapsed time from a birth date (needs birthYear/Month/Day; optional asOf*). "yearsBetween": span between two dates (needs from* and to*). | |
| birthYear | No | Birth year (proleptic Gregorian). Required when operation is compute. | |
| birthMonth | No | Birth month 1-12. Required when operation is compute. | |
| birthDay | No | Birth day 1-31; must be a real calendar date. Required when operation is compute. | |
| asOfYear | No | Reference year for compute. Omit all asOf* to use today (UTC). | |
| asOfMonth | No | Reference month 1-12 for compute. Omit all asOf* to use today (UTC). | |
| asOfDay | No | Reference day 1-31 for compute. Omit all asOf* to use today (UTC). | |
| fromYear | No | Start year. Required when operation is yearsBetween. | |
| fromMonth | No | Start month 1-12. Required when operation is yearsBetween. | |
| fromDay | No | Start day 1-31. Required when operation is yearsBetween. | |
| toYear | No | End year. Required when operation is yearsBetween. | |
| toMonth | No | End month 1-12. Required when operation is yearsBetween. | |
| toDay | No | End day 1-31. Required when operation is yearsBetween. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | No | The operation that was run, echoed back (compute or yearsBetween). | |
| data | No | Result payload; shape depends on operation. |