UNPKG

677 BJavaScriptView Raw
1import { startOfDay } from "./startOfDay.js";
2
3/**
4 * The {@link startOfToday} function options.
5 */
6
7/**
8 * @name startOfToday
9 * @category Day Helpers
10 * @summary Return the start of today.
11 * @pure false
12 *
13 * @description
14 * Return the start of today.
15 *
16 * @typeParam ContextDate - The `Date` type of the context function.
17 *
18 * @param options - An object with options
19 *
20 * @returns The start of today
21 *
22 * @example
23 * // If today is 6 October 2014:
24 * const result = startOfToday()
25 * //=> Mon Oct 6 2014 00:00:00
26 */
27export function startOfToday(options) {
28 return startOfDay(Date.now(), options);
29}
30
31// Fallback for modularized imports:
32export default startOfToday;