UNPKG

vremel

Version:

JavaScript date utility library for Temporal API

21 lines 905 B
import type { Temporal } from "../types.js"; export interface EndOfWeekOptions { /** * First day of the week. * For example, in ISO calendar Monday is `1`, Sunday is `7`. */ firstDayOfWeek: number; } /** * Returns the end of a week for the given datetime. * 'end of a 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 dt datetime object which includes date info * @returns Temporal object which represents the end of a week */ export declare function endOfWeek<DateTime extends Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime>(dt: DateTime, options: EndOfWeekOptions): DateTime; //# sourceMappingURL=endOfWeek.d.ts.map