UNPKG

711 BTypeScriptView Raw
1/**
2 * @name previousThursday
3 * @category Weekday Helpers
4 * @summary When is the previous Thursday?
5 *
6 * @description
7 * When is the previous Thursday?
8 *
9 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
10 *
11 * @param date - The date to start counting from
12 *
13 * @returns The previous Thursday
14 *
15 * @example
16 * // When is the previous Thursday before Jun, 18, 2021?
17 * const result = previousThursday(new Date(2021, 5, 18))
18 * //=> Thu June 17 2021 00:00:00
19 */
20export declare function previousThursday<DateType extends Date>(
21 date: DateType | number | string,
22): DateType;