endOfTomorrow.d.cts 1.0 KB

123456789101112131415161718192021222324252627282930
  1. import type { ContextOptions } from "./types.js";
  2. /**
  3. * The {@link endOfTomorrow} function options.
  4. */
  5. export interface EndOfTomorrowOptions<DateType extends Date = Date>
  6. extends ContextOptions<DateType> {}
  7. /**
  8. * @name endOfTomorrow
  9. * @category Day Helpers
  10. * @summary Return the end of tomorrow.
  11. * @pure false
  12. *
  13. * @description
  14. * Return the end of tomorrow.
  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. * @returns The end of tomorrow
  21. *
  22. * @example
  23. * // If today is 6 October 2014:
  24. * const result = endOfTomorrow()
  25. * //=> Tue Oct 7 2014 23:59:59.999
  26. */
  27. export declare function endOfTomorrow<
  28. DateType extends Date,
  29. ResultDate extends Date = DateType,
  30. >(options?: EndOfTomorrowOptions<ResultDate> | undefined): ResultDate;