UNPKG

vremel

Version:

JavaScript date utility library for Temporal API

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