UNPKG

vremel

Version:

JavaScript date utility library for Temporal API

23 lines 896 B
import type { Temporal } from "../types.js"; export interface IsSameWeekOptions { /** * First day of the week. * For example, in ISO calendar Monday is `1`, Sunday is `7`. */ firstDayOfWeek: number; } /** * Checks whether the two Temporal objects are in the same week. * * 'same week' is ambiguous and locale-dependent, * so `firstDayOfWeek` option is required. * * This function supports a calendar with a fixed `daysInWeek`, * even if the week contains more or less than 7 days. * But it doesn't support a calendar which lacks a fixed number of days. * * @param dt1 first date time object * @param dt2 second date time object */ export declare function isSameWeek<DateTime extends Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime>(dt1: DateTime, dt2: DateTime, options: IsSameWeekOptions): boolean; //# sourceMappingURL=isSameWeek.d.ts.map