@technobuddha/library
Version:
A large library of useful functions
24 lines (23 loc) • 752 B
TypeScript
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;