Works with
•JSR Score70%•It is unknown whether this package works with Node.js, Deno, Browsers, Cloudflare Workers, Bun




Published2 years ago (0.215.0)
Functions
f
difference(): DifferenceFormat
from: Date,
to: Date,
options?: DifferenceOptions
Returns the difference of the 2 given dates in the given units. If the units are omitted, it returns the difference in the all available units.
Type Aliases
T
DifferenceFormat = Partial<Record<Unit, number>>
Return type for difference.
T
DifferenceOptions = { units?: Unit[]; }
Options for difference.
- units: Unit[]No documentation available
T
Unit =
"milliseconds"
| "seconds"
| "minutes"
| "hours"
| "days"
| "weeks"
| "months"
| "quarters"
| "years"
| "seconds"
| "minutes"
| "hours"
| "days"
| "weeks"
| "months"
| "quarters"
| "years"
Duration units for DifferenceFormat and
DifferenceOptions.