UNPKG

temporal-extra

Version:

Locale-aware date utilities for Temporal: week numbers, date adjusters, polyfill support and more

25 lines (24 loc) 1.15 kB
export type ComparableDate = Temporal.PlainDate | Temporal.PlainTime | Temporal.PlainDateTime | Temporal.ZonedDateTime; /** * Returns true if the Temporal is equal to the reference. * * This comparator is different from the Temporal's `equals` method, as it only * compares the point in time, ignoring the calendar system. */ export declare const isEqual: <T extends ComparableDate>(temporal: T, reference: NoInfer<T>) => boolean; /** * Returns true if the Temporal is before the reference. */ export declare const isBefore: <T extends ComparableDate>(temporal: T, reference: NoInfer<T>) => boolean; /** * Returns true if the Temporal is before or equal to the reference. */ export declare const isBeforeOrEqual: <T extends ComparableDate>(temporal: T, reference: NoInfer<T>) => boolean; /** * Returns true if the Temporal is after the reference. */ export declare const isAfter: <T extends ComparableDate>(temporal: T, reference: NoInfer<T>) => boolean; /** * Returns true if the Temporal is after or equal to the reference. */ export declare const isAfterOrEqual: <T extends ComparableDate>(temporal: T, reference: NoInfer<T>) => boolean;