index.js 873 B

1234567891011121314151617181920212223
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = isSameUTCWeek;
  6. var _index = _interopRequireDefault(require("../startOfUTCWeek/index.js"));
  7. var _index2 = _interopRequireDefault(require("../requiredArgs/index.js"));
  8. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  9. // This function will be a part of public API when UTC function will be implemented.
  10. // See issue: https://github.com/date-fns/date-fns/issues/376
  11. function isSameUTCWeek(dirtyDateLeft, dirtyDateRight, options) {
  12. (0, _index2.default)(2, arguments);
  13. var dateLeftStartOfWeek = (0, _index.default)(dirtyDateLeft, options);
  14. var dateRightStartOfWeek = (0, _index.default)(dirtyDateRight, options);
  15. return dateLeftStartOfWeek.getTime() === dateRightStartOfWeek.getTime();
  16. }
  17. module.exports = exports.default;