@technobuddha/library
Version:
A large library of useful functions
20 lines (19 loc) • 637 B
TypeScript
import type { DayOfWeek } from '../constants';
declare type Options = {
/** use the UTC timezone */
UTC?: boolean;
/** which day to use as the first day of the week */
firstDayOfWeek?: DayOfWeek;
};
/**
* Determine if two dates occur in the same week
*
* @param input1 The first date
* @param input2 The second date
* @param __namedParameters see {@link Options}
* @default UTC false
* @default firstDayOfWeek Sunday
* @returns true, if the two dates occur in the same week
*/
export declare function isSameWeek(input1: Date, input2: Date, { UTC, firstDayOfWeek }?: Options): boolean;
export default isSameWeek;