startOfYesterday.d.cts 807 B

1234567891011121314151617181920212223242526272829
  1. import type { ContextOptions } from "./types.js";
  2. /**
  3. * The {@link startOfYesterday} function options.
  4. */
  5. export interface StartOfYesterdayOptions<DateType extends Date = Date>
  6. extends ContextOptions<DateType> {}
  7. /**
  8. * @name startOfYesterday
  9. * @category Day Helpers
  10. * @summary Return the start of yesterday.
  11. * @pure false
  12. *
  13. * @typeParam ContextDate - The `Date` type of the context function.
  14. *
  15. * @param options - An object with options
  16. *
  17. * @description
  18. * Return the start of yesterday.
  19. *
  20. * @returns The start of yesterday
  21. *
  22. * @example
  23. * // If today is 6 October 2014:
  24. * const result = startOfYesterday()
  25. * //=> Sun Oct 5 2014 00:00:00
  26. */
  27. export declare function startOfYesterday<ContextDate extends Date>(
  28. options?: StartOfYesterdayOptions<ContextDate> | undefined,
  29. ): ContextDate;