index.js 845 B

12345678910111213141516171819202122232425262728293031
  1. "use strict";
  2. var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
  3. Object.defineProperty(exports, "__esModule", {
  4. value: true
  5. });
  6. exports.default = endOfToday;
  7. var _index = _interopRequireDefault(require("../endOfDay/index.js"));
  8. /**
  9. * @name endOfToday
  10. * @category Day Helpers
  11. * @summary Return the end of today.
  12. * @pure false
  13. *
  14. * @description
  15. * Return the end of today.
  16. *
  17. * > ⚠️ Please note that this function is not present in the FP submodule as
  18. * > it uses `Date.now()` internally hence impure and can't be safely curried.
  19. *
  20. * @returns {Date} the end of today
  21. *
  22. * @example
  23. * // If today is 6 October 2014:
  24. * const result = endOfToday()
  25. * //=> Mon Oct 6 2014 23:59:59.999
  26. */
  27. function endOfToday() {
  28. return (0, _index.default)(Date.now());
  29. }
  30. module.exports = exports.default;