@technobuddha/library
Version:
A large library of useful functions
19 lines (18 loc) • 632 B
TypeScript
import type { DayOfWeek } from '../constants';
declare type GetDayOfWeekOptions = {
/** Use the UTC timezone */
UTC?: boolean;
/** Which day of the week is considered the beginning */
startOfWeek?: DayOfWeek;
};
/**
* Determine the day of the week for a specific date
*
* @param input The date
* @param __namedParameters see {@link Options}
* @default UTC false
* @default startOfWeek Monday
* @returns The date value for midnight on the first day of the specified year
*/
export declare function getDayOfWeek(input: Date, { UTC, startOfWeek }?: GetDayOfWeekOptions): DayOfWeek;
export default getDayOfWeek;