UNPKG

@technobuddha/library

Version:
18 lines (17 loc) 768 B
import type { DayOfWeek } from '../constants'; declare type Options = { /** Use the UTC timezone */ UTC?: boolean; }; /** * Determine the date of an occurrence of a weekday within a month * * @param input A date within the month in question * @param dayOfWeek The day of the week to find the occurrence * @param occurrence The occurrence number, or 'last' to find the last occurrence * @param __namedParameters see {@link Options} * @defaultValue UTC false * @returns A date object corresponding to the occurrence requested, or null if no such date exists in the month */ export declare function getOccurrenceInMonth(input: Date, dayOfWeek: DayOfWeek, occurrence: number | 'last', { UTC }?: Options): Date | null; export default getOccurrenceInMonth;