startOfToday.d.ts 771 B

1234567891011121314151617181920212223242526272829
  1. import type { ContextOptions } from "./types.js";
  2. /**
  3. * The {@link startOfToday} function options.
  4. */
  5. export interface StartOfTodayOptions<DateType extends Date = Date>
  6. extends ContextOptions<DateType> {}
  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. */
  27. export declare function startOfToday<ContextDate extends Date>(
  28. options?: StartOfTodayOptions<ContextDate> | undefined,
  29. ): ContextDate;