UNPKG

@technobuddha/library

Version:
24 lines (23 loc) 752 B
import type { DayOfWeek } from '../constants'; declare type Options = { /** Use the UTC timezone */ UTC?: boolean; /** Week 1 is definied as the week with the Gregoriain year's first [weekOneInclues] day in it */ weekOneIncludes?: DayOfWeek; /** The first day of the week */ firstDayOfWeek?: DayOfWeek; }; /** * Determine the ISO week number for a given date * * @param input The date * @param __namedParameteres see {@link Options} * @default weekOneIncludes Thursday * @default firstDayOfWeek Monday * @returns the week number (1-53) */ export declare function getISOWeekOfYear(input: Date, { UTC, weekOneIncludes, firstDayOfWeek }?: Options): { year: number; week: number; }; export default getISOWeekOfYear;