endOfToday.cjs 895 B

1234567891011121314151617181920212223242526272829303132
  1. "use strict";
  2. exports.endOfToday = endOfToday;
  3. var _index = require("./endOfDay.cjs");
  4. /**
  5. * The {@link endOfToday} function options.
  6. */
  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. */
  28. function endOfToday(options) {
  29. return (0, _index.endOfDay)(Date.now(), options);
  30. }