UNPKG

@northguild/gmt

Version:

Date and time library for JavaScript and TypeScript, built on TC39 Temporal: time zones, DST, business days, ISO 8601 strings in and out. Never throws.

11 lines • 478 B
/** * Whether `unit` is a duration unit a year-month takes: `"years"` or `"months"`. This is the set * AddDurationToYearMonth leaves after it rejects nonzero weeks, days and time units. * * @param unit the candidate key * @returns whether it is `"years"` or `"months"` * * @example isYearMonthDurationUnit("months") // true * @example isYearMonthDurationUnit("days") // false */ export declare function isYearMonthDurationUnit(unit: string): unit is "years" | "months";