index.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = endOfToday;
  6. var _index = _interopRequireDefault(require("../endOfDay/index.js"));
  7. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  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. * ### v2.0.0 breaking changes:
  21. *
  22. * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
  23. *
  24. * @returns {Date} the end of today
  25. *
  26. * @example
  27. * // If today is 6 October 2014:
  28. * var result = endOfToday()
  29. * //=> Mon Oct 6 2014 23:59:59.999
  30. */
  31. function endOfToday() {
  32. return (0, _index.default)(Date.now());
  33. }
  34. module.exports = exports.default;