startOfToday.cjs 662 B

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