Founding price: $35, then $99 after 23:59 UTC on 4 November, then $99
Get ProTwo dates that give the exact difference in years, months and days with borrowing, the total days and weeks, and whether the first is before or after the second. Use this when someone needs the gap between two dates, such as an age, a tenure or time since an event.
Derived from this item’s props table, because it declares no controls of its own. This item has no standalone playground, so changes update the code, the share link and the AI prompt.
Use it when someone needs the gap between two dates, such as an age, a tenure or time since an event.
Do not use it to count working days; use date-range-duration-summary.
This item is part of tealmac UI Pro
The source for this item installs with a Pro licence key. Log in with your key to see the install command, or read the Pro setup page.
| Prop | Type | Default | Description |
|---|---|---|---|
| from / to (defaults) | string | null | null | The two dates; the second defaults to today. |
| onValueChange | (result) => void | - | The difference. |
| today / locale | - | - | Reference and locale. |
The pattern ships with a Testing Library test (date-difference-calculator.test.tsx) that covers borrowing across months, leap days, end-of-month starts and reversed dates.