UNPKG

1 kBTypeScriptView Raw
1import type { ContextOptions } from "./types.js";
2/**
3 * The {@link endOfToday} function options.
4 */
5export interface EndOfTodayOptions<DateType extends Date = Date>
6 extends ContextOptions<DateType> {}
7/**
8 * @name endOfToday
9 * @category Day Helpers
10 * @summary Return the end of today.
11 * @pure false
12 *
13 * @description
14 * Return the end of today.
15 *
16 * @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).
17 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
18 *
19 * @param options - The options
20 *
21 * @returns The end of today
22 *
23 * @example
24 * // If today is 6 October 2014:
25 * const result = endOfToday()
26 * //=> Mon Oct 6 2014 23:59:59.999
27 */
28export declare function endOfToday<ResultDate extends Date = Date>(
29 options?: EndOfTodayOptions<ResultDate>,
30): ResultDate;