getUntil()function
getUntil(target: PossibleDate, current: PossibleDate = "now", caller: AnyCaller = getUntil): DurationData
| Param | Type | |
|---|---|---|
target | PossibleDate | Date the duration counts up to. required |
current | PossibleDate | Date the duration counts from (defaults to now). Defaults to "now" |
caller | AnyCaller |
| Return | |
|---|---|
DurationData |
| Throws | |
|---|---|
RequiredError | If target or current cannot be converted to a valid date. |
Get the various time units until a certain date.
Examples
getUntil("2099-01-01") // { years: 73, ... }