I
UseTimeAgoUnit
testeddemoA single time unit used while resolving the most appropriate granularity.
Demo
Loading demo…
Signature
ts
interface UseTimeAgoUnit<Unit extends string = UseTimeAgoUnitName>Type Parameters
Unitextends string= UseTimeAgoUnitNameProperties
| Property | Type | Description |
|---|---|---|
max | number | Upper bound (exclusive) of the absolute diff (ms) this unit applies to |
value | number | Length of one unit in milliseconds |
name | Unit | Unit name; used to look up the matching message formatter |