UNPKG

date-fns

Version:

Modern JavaScript date utility library

656 lines (626 loc) 279 kB
(() => { function _createForOfIteratorHelper(r, e) {var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];if (!t) {if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {t && (r = t);var _n = 0,F = function F() {};return { s: F, n: function n() {return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] };}, e: function e(r) {throw r;}, f: F };}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a = !0,u = !1;return { s: function s() {t = t.call(r);}, n: function n() {var r = t.next();return a = r.done, r;}, e: function e(r) {u = !0, o = r;}, f: function f() {try {a || null == t.return || t.return();} finally {if (u) throw o;}} };}function _callSuper(t, o, e) {return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));}function _possibleConstructorReturn(t, e) {if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e) {if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct() {try {var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));} catch (t) {}return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {return !!t;})();}function _getPrototypeOf(t) {return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {return t.__proto__ || Object.getPrototypeOf(t);}, _getPrototypeOf(t);}function _inherits(t, e) {if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e);}function _setPrototypeOf(t, e) {return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {return t.__proto__ = e, t;}, _setPrototypeOf(t, e);}function _classCallCheck(a, n) {if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");}function _defineProperties(e, r) {for (var t = 0; t < r.length; t++) {var o = r[t];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);}}function _createClass(e, r, t) {return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;}function _toArray(r) {return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest();}function _slicedToArray(r, e) {return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(r, l) {var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];if (null != t) {var e,n,i,u,a = [],f = !0,o = !1;try {if (i = (t = t.call(r)).next, 0 === l) {if (Object(t) !== t) return;f = !1;} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);} catch (r) {o = !0, n = r;} finally {try {if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;} finally {if (o) throw n;}}return a;}}function _arrayWithHoles(r) {if (Array.isArray(r)) return r;}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(e, r, t) {return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : i + "";}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}function _toConsumableArray(r) {return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r, a) {if (r) {if ("string" == typeof r) return _arrayLikeToArray(r, a);var t = {}.toString.call(r).slice(8, -1);return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;}}function _iterableToArray(r) {if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);}function _arrayWithoutHoles(r) {if (Array.isArray(r)) return _arrayLikeToArray(r);}function _arrayLikeToArray(r, a) {(null == a || a > r.length) && (a = r.length);for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];return n;}function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}var __defProp = Object.defineProperty; var __returnValue = function __returnValue(v) {return v;}; function __exportSetter(name, newValue) { this[name] = __returnValue.bind(null, newValue); } var __export = function __export(target, all) { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true, configurable: true, set: __exportSetter.bind(all, name) }); }; // lib/fp.js var exports_fp = {}; __export(exports_fp, { yearsToQuarters: function yearsToQuarters() {return yearsToQuarters2;}, yearsToMonths: function yearsToMonths() {return yearsToMonths2;}, yearsToDays: function yearsToDays() {return yearsToDays2;}, weeksToDays: function weeksToDays() {return weeksToDays2;}, transpose: function transpose() {return transpose2;}, toDate: function toDate() {return toDate2;}, subYearsWithOptions: function subYearsWithOptions() {return _subYearsWithOptions;}, subYears: function subYears() {return subYears2;}, subWithOptions: function subWithOptions() {return _subWithOptions;}, subWeeksWithOptions: function subWeeksWithOptions() {return _subWeeksWithOptions;}, subWeeks: function subWeeks() {return subWeeks2;}, subSecondsWithOptions: function subSecondsWithOptions() {return _subSecondsWithOptions;}, subSeconds: function subSeconds() {return subSeconds2;}, subQuartersWithOptions: function subQuartersWithOptions() {return _subQuartersWithOptions;}, subQuarters: function subQuarters() {return subQuarters2;}, subMonthsWithOptions: function subMonthsWithOptions() {return _subMonthsWithOptions;}, subMonths: function subMonths() {return subMonths2;}, subMinutesWithOptions: function subMinutesWithOptions() {return _subMinutesWithOptions;}, subMinutes: function subMinutes() {return subMinutes2;}, subMillisecondsWithOptions: function subMillisecondsWithOptions() {return _subMillisecondsWithOptions;}, subMilliseconds: function subMilliseconds() {return subMilliseconds2;}, subISOWeekYearsWithOptions: function subISOWeekYearsWithOptions() {return _subISOWeekYearsWithOptions;}, subISOWeekYears: function subISOWeekYears() {return subISOWeekYears2;}, subHoursWithOptions: function subHoursWithOptions() {return _subHoursWithOptions;}, subHours: function subHours() {return subHours2;}, subDaysWithOptions: function subDaysWithOptions() {return _subDaysWithOptions;}, subDays: function subDays() {return subDays2;}, subBusinessDaysWithOptions: function subBusinessDaysWithOptions() {return _subBusinessDaysWithOptions;}, subBusinessDays: function subBusinessDays() {return subBusinessDays2;}, sub: function sub() {return sub2;}, startOfYearWithOptions: function startOfYearWithOptions() {return _startOfYearWithOptions;}, startOfYear: function startOfYear() {return startOfYear2;}, startOfWeekYearWithOptions: function startOfWeekYearWithOptions() {return _startOfWeekYearWithOptions;}, startOfWeekYear: function startOfWeekYear() {return startOfWeekYear2;}, startOfWeekWithOptions: function startOfWeekWithOptions() {return _startOfWeekWithOptions;}, startOfWeek: function startOfWeek() {return startOfWeek2;}, startOfSecondWithOptions: function startOfSecondWithOptions() {return _startOfSecondWithOptions;}, startOfSecond: function startOfSecond() {return startOfSecond2;}, startOfQuarterWithOptions: function startOfQuarterWithOptions() {return _startOfQuarterWithOptions;}, startOfQuarter: function startOfQuarter() {return startOfQuarter2;}, startOfMonthWithOptions: function startOfMonthWithOptions() {return _startOfMonthWithOptions;}, startOfMonth: function startOfMonth() {return startOfMonth2;}, startOfMinuteWithOptions: function startOfMinuteWithOptions() {return _startOfMinuteWithOptions;}, startOfMinute: function startOfMinute() {return startOfMinute2;}, startOfISOWeekYearWithOptions: function startOfISOWeekYearWithOptions() {return _startOfISOWeekYearWithOptions;}, startOfISOWeekYear: function startOfISOWeekYear() {return startOfISOWeekYear2;}, startOfISOWeekWithOptions: function startOfISOWeekWithOptions() {return _startOfISOWeekWithOptions;}, startOfISOWeek: function startOfISOWeek() {return startOfISOWeek2;}, startOfHourWithOptions: function startOfHourWithOptions() {return _startOfHourWithOptions;}, startOfHour: function startOfHour() {return startOfHour2;}, startOfDecadeWithOptions: function startOfDecadeWithOptions() {return _startOfDecadeWithOptions;}, startOfDecade: function startOfDecade() {return startOfDecade2;}, startOfDayWithOptions: function startOfDayWithOptions() {return _startOfDayWithOptions;}, startOfDay: function startOfDay() {return startOfDay2;}, setYearWithOptions: function setYearWithOptions() {return _setYearWithOptions;}, setYear: function setYear() {return setYear2;}, setWithOptions: function setWithOptions() {return _setWithOptions;}, setWeekYearWithOptions: function setWeekYearWithOptions() {return _setWeekYearWithOptions;}, setWeekYear: function setWeekYear() {return setWeekYear2;}, setWeekWithOptions: function setWeekWithOptions() {return _setWeekWithOptions;}, setWeek: function setWeek() {return setWeek2;}, setSecondsWithOptions: function setSecondsWithOptions() {return _setSecondsWithOptions;}, setSeconds: function setSeconds() {return setSeconds2;}, setQuarterWithOptions: function setQuarterWithOptions() {return _setQuarterWithOptions;}, setQuarter: function setQuarter() {return setQuarter2;}, setMonthWithOptions: function setMonthWithOptions() {return _setMonthWithOptions;}, setMonth: function setMonth() {return setMonth2;}, setMinutesWithOptions: function setMinutesWithOptions() {return _setMinutesWithOptions;}, setMinutes: function setMinutes() {return setMinutes2;}, setMillisecondsWithOptions: function setMillisecondsWithOptions() {return _setMillisecondsWithOptions;}, setMilliseconds: function setMilliseconds() {return setMilliseconds2;}, setISOWeekYearWithOptions: function setISOWeekYearWithOptions() {return _setISOWeekYearWithOptions;}, setISOWeekYear: function setISOWeekYear() {return setISOWeekYear2;}, setISOWeekWithOptions: function setISOWeekWithOptions() {return _setISOWeekWithOptions;}, setISOWeek: function setISOWeek() {return setISOWeek2;}, setISODayWithOptions: function setISODayWithOptions() {return _setISODayWithOptions;}, setISODay: function setISODay() {return setISODay2;}, setHoursWithOptions: function setHoursWithOptions() {return _setHoursWithOptions;}, setHours: function setHours() {return setHours2;}, setDayWithOptions: function setDayWithOptions() {return _setDayWithOptions;}, setDayOfYearWithOptions: function setDayOfYearWithOptions() {return _setDayOfYearWithOptions;}, setDayOfYear: function setDayOfYear() {return setDayOfYear2;}, setDay: function setDay() {return setDay2;}, setDateWithOptions: function setDateWithOptions() {return _setDateWithOptions;}, setDate: function setDate() {return setDate2;}, set: function set() {return set2;}, secondsToMinutes: function secondsToMinutes() {return secondsToMinutes2;}, secondsToMilliseconds: function secondsToMilliseconds() {return secondsToMilliseconds2;}, secondsToHours: function secondsToHours() {return secondsToHours2;}, roundToNearestMinutesWithOptions: function roundToNearestMinutesWithOptions() {return _roundToNearestMinutesWithOptions;}, roundToNearestMinutes: function roundToNearestMinutes() {return roundToNearestMinutes2;}, roundToNearestHoursWithOptions: function roundToNearestHoursWithOptions() {return _roundToNearestHoursWithOptions;}, roundToNearestHours: function roundToNearestHours() {return roundToNearestHours2;}, quartersToYears: function quartersToYears() {return quartersToYears2;}, quartersToMonths: function quartersToMonths() {return quartersToMonths2;}, previousWednesdayWithOptions: function previousWednesdayWithOptions() {return _previousWednesdayWithOptions;}, previousWednesday: function previousWednesday() {return previousWednesday2;}, previousTuesdayWithOptions: function previousTuesdayWithOptions() {return _previousTuesdayWithOptions;}, previousTuesday: function previousTuesday() {return previousTuesday2;}, previousThursdayWithOptions: function previousThursdayWithOptions() {return _previousThursdayWithOptions;}, previousThursday: function previousThursday() {return previousThursday2;}, previousSundayWithOptions: function previousSundayWithOptions() {return _previousSundayWithOptions;}, previousSunday: function previousSunday() {return previousSunday2;}, previousSaturdayWithOptions: function previousSaturdayWithOptions() {return _previousSaturdayWithOptions;}, previousSaturday: function previousSaturday() {return previousSaturday2;}, previousMondayWithOptions: function previousMondayWithOptions() {return _previousMondayWithOptions;}, previousMonday: function previousMonday() {return previousMonday2;}, previousFridayWithOptions: function previousFridayWithOptions() {return _previousFridayWithOptions;}, previousFriday: function previousFriday() {return previousFriday2;}, previousDayWithOptions: function previousDayWithOptions() {return _previousDayWithOptions;}, previousDay: function previousDay() {return previousDay2;}, parseWithOptions: function parseWithOptions() {return _parseWithOptions;}, parseJSONWithOptions: function parseJSONWithOptions() {return _parseJSONWithOptions;}, parseJSON: function parseJSON() {return parseJSON2;}, parseISOWithOptions: function parseISOWithOptions() {return _parseISOWithOptions;}, parseISO: function parseISO() {return parseISO2;}, parse: function parse() {return parse2;}, nextWednesdayWithOptions: function nextWednesdayWithOptions() {return _nextWednesdayWithOptions;}, nextWednesday: function nextWednesday() {return nextWednesday2;}, nextTuesdayWithOptions: function nextTuesdayWithOptions() {return _nextTuesdayWithOptions;}, nextTuesday: function nextTuesday() {return nextTuesday2;}, nextThursdayWithOptions: function nextThursdayWithOptions() {return _nextThursdayWithOptions;}, nextThursday: function nextThursday() {return nextThursday2;}, nextSundayWithOptions: function nextSundayWithOptions() {return _nextSundayWithOptions;}, nextSunday: function nextSunday() {return nextSunday2;}, nextSaturdayWithOptions: function nextSaturdayWithOptions() {return _nextSaturdayWithOptions;}, nextSaturday: function nextSaturday() {return nextSaturday2;}, nextMondayWithOptions: function nextMondayWithOptions() {return _nextMondayWithOptions;}, nextMonday: function nextMonday() {return nextMonday2;}, nextFridayWithOptions: function nextFridayWithOptions() {return _nextFridayWithOptions;}, nextFriday: function nextFriday() {return nextFriday2;}, nextDayWithOptions: function nextDayWithOptions() {return _nextDayWithOptions;}, nextDay: function nextDay() {return nextDay2;}, monthsToYears: function monthsToYears() {return monthsToYears2;}, monthsToQuarters: function monthsToQuarters() {return monthsToQuarters2;}, minutesToSeconds: function minutesToSeconds() {return minutesToSeconds2;}, minutesToMilliseconds: function minutesToMilliseconds() {return minutesToMilliseconds2;}, minutesToHours: function minutesToHours() {return minutesToHours2;}, minWithOptions: function minWithOptions() {return _minWithOptions;}, min: function min() {return min2;}, millisecondsToSeconds: function millisecondsToSeconds() {return millisecondsToSeconds2;}, millisecondsToMinutes: function millisecondsToMinutes() {return millisecondsToMinutes2;}, millisecondsToHours: function millisecondsToHours() {return millisecondsToHours2;}, milliseconds: function milliseconds() {return milliseconds2;}, maxWithOptions: function maxWithOptions() {return _maxWithOptions;}, max: function max() {return max2;}, lightFormat: function lightFormat() {return lightFormat2;}, lastDayOfYearWithOptions: function lastDayOfYearWithOptions() {return _lastDayOfYearWithOptions;}, lastDayOfYear: function lastDayOfYear() {return lastDayOfYear2;}, lastDayOfWeekWithOptions: function lastDayOfWeekWithOptions() {return _lastDayOfWeekWithOptions;}, lastDayOfWeek: function lastDayOfWeek() {return lastDayOfWeek2;}, lastDayOfQuarterWithOptions: function lastDayOfQuarterWithOptions() {return _lastDayOfQuarterWithOptions;}, lastDayOfQuarter: function lastDayOfQuarter() {return lastDayOfQuarter2;}, lastDayOfMonthWithOptions: function lastDayOfMonthWithOptions() {return _lastDayOfMonthWithOptions;}, lastDayOfMonth: function lastDayOfMonth() {return lastDayOfMonth2;}, lastDayOfISOWeekYearWithOptions: function lastDayOfISOWeekYearWithOptions() {return _lastDayOfISOWeekYearWithOptions;}, lastDayOfISOWeekYear: function lastDayOfISOWeekYear() {return lastDayOfISOWeekYear2;}, lastDayOfISOWeekWithOptions: function lastDayOfISOWeekWithOptions() {return _lastDayOfISOWeekWithOptions;}, lastDayOfISOWeek: function lastDayOfISOWeek() {return lastDayOfISOWeek2;}, lastDayOfDecadeWithOptions: function lastDayOfDecadeWithOptions() {return _lastDayOfDecadeWithOptions;}, lastDayOfDecade: function lastDayOfDecade() {return lastDayOfDecade2;}, isWithinIntervalWithOptions: function isWithinIntervalWithOptions() {return _isWithinIntervalWithOptions;}, isWithinInterval: function isWithinInterval() {return isWithinInterval2;}, isWeekendWithOptions: function isWeekendWithOptions() {return _isWeekendWithOptions;}, isWeekend: function isWeekend() {return isWeekend2;}, isWednesdayWithOptions: function isWednesdayWithOptions() {return _isWednesdayWithOptions;}, isWednesday: function isWednesday() {return isWednesday2;}, isValid: function isValid() {return isValid2;}, isTuesdayWithOptions: function isTuesdayWithOptions() {return _isTuesdayWithOptions;}, isTuesday: function isTuesday() {return isTuesday2;}, isThursdayWithOptions: function isThursdayWithOptions() {return _isThursdayWithOptions;}, isThursday: function isThursday() {return isThursday2;}, isSundayWithOptions: function isSundayWithOptions() {return _isSundayWithOptions;}, isSunday: function isSunday() {return isSunday2;}, isSaturdayWithOptions: function isSaturdayWithOptions() {return _isSaturdayWithOptions;}, isSaturday: function isSaturday() {return isSaturday2;}, isSameYearWithOptions: function isSameYearWithOptions() {return _isSameYearWithOptions;}, isSameYear: function isSameYear() {return isSameYear2;}, isSameWeekWithOptions: function isSameWeekWithOptions() {return _isSameWeekWithOptions;}, isSameWeek: function isSameWeek() {return isSameWeek2;}, isSameSecond: function isSameSecond() {return isSameSecond2;}, isSameQuarterWithOptions: function isSameQuarterWithOptions() {return _isSameQuarterWithOptions;}, isSameQuarter: function isSameQuarter() {return isSameQuarter2;}, isSameMonthWithOptions: function isSameMonthWithOptions() {return _isSameMonthWithOptions;}, isSameMonth: function isSameMonth() {return isSameMonth2;}, isSameMinute: function isSameMinute() {return isSameMinute2;}, isSameISOWeekYearWithOptions: function isSameISOWeekYearWithOptions() {return _isSameISOWeekYearWithOptions;}, isSameISOWeekYear: function isSameISOWeekYear() {return isSameISOWeekYear2;}, isSameISOWeekWithOptions: function isSameISOWeekWithOptions() {return _isSameISOWeekWithOptions;}, isSameISOWeek: function isSameISOWeek() {return isSameISOWeek2;}, isSameHourWithOptions: function isSameHourWithOptions() {return _isSameHourWithOptions;}, isSameHour: function isSameHour() {return isSameHour2;}, isSameDayWithOptions: function isSameDayWithOptions() {return _isSameDayWithOptions;}, isSameDay: function isSameDay() {return isSameDay2;}, isMondayWithOptions: function isMondayWithOptions() {return _isMondayWithOptions;}, isMonday: function isMonday() {return isMonday2;}, isMatchWithOptions: function isMatchWithOptions() {return _isMatchWithOptions;}, isMatch: function isMatch() {return isMatch2;}, isLeapYearWithOptions: function isLeapYearWithOptions() {return _isLeapYearWithOptions;}, isLeapYear: function isLeapYear() {return isLeapYear2;}, isLastDayOfMonthWithOptions: function isLastDayOfMonthWithOptions() {return _isLastDayOfMonthWithOptions;}, isLastDayOfMonth: function isLastDayOfMonth() {return isLastDayOfMonth2;}, isFridayWithOptions: function isFridayWithOptions() {return _isFridayWithOptions;}, isFriday: function isFriday() {return isFriday2;}, isFirstDayOfMonthWithOptions: function isFirstDayOfMonthWithOptions() {return _isFirstDayOfMonthWithOptions;}, isFirstDayOfMonth: function isFirstDayOfMonth() {return isFirstDayOfMonth2;}, isExists: function isExists() {return isExists2;}, isEqual: function isEqual() {return isEqual2;}, isDate: function isDate() {return isDate2;}, isBefore: function isBefore() {return isBefore2;}, isAfter: function isAfter() {return isAfter2;}, intlFormatDistanceWithOptions: function intlFormatDistanceWithOptions() {return _intlFormatDistanceWithOptions;}, intlFormatDistance: function intlFormatDistance() {return intlFormatDistance2;}, intlFormat: function intlFormat() {return intlFormat2;}, intervalWithOptions: function intervalWithOptions() {return _intervalWithOptions;}, intervalToDurationWithOptions: function intervalToDurationWithOptions() {return _intervalToDurationWithOptions;}, intervalToDuration: function intervalToDuration() {return intervalToDuration2;}, interval: function interval() {return interval2;}, hoursToSeconds: function hoursToSeconds() {return hoursToSeconds2;}, hoursToMinutes: function hoursToMinutes() {return hoursToMinutes2;}, hoursToMilliseconds: function hoursToMilliseconds() {return hoursToMilliseconds2;}, getYearWithOptions: function getYearWithOptions() {return _getYearWithOptions;}, getYear: function getYear() {return getYear2;}, getWeeksInMonthWithOptions: function getWeeksInMonthWithOptions() {return _getWeeksInMonthWithOptions;}, getWeeksInMonth: function getWeeksInMonth() {return getWeeksInMonth2;}, getWeekYearWithOptions: function getWeekYearWithOptions() {return _getWeekYearWithOptions;}, getWeekYear: function getWeekYear() {return getWeekYear2;}, getWeekWithOptions: function getWeekWithOptions() {return _getWeekWithOptions;}, getWeekOfMonthWithOptions: function getWeekOfMonthWithOptions() {return _getWeekOfMonthWithOptions;}, getWeekOfMonth: function getWeekOfMonth() {return getWeekOfMonth2;}, getWeek: function getWeek() {return getWeek2;}, getUnixTime: function getUnixTime() {return getUnixTime2;}, getTime: function getTime() {return getTime2;}, getSeconds: function getSeconds() {return getSeconds2;}, getQuarterWithOptions: function getQuarterWithOptions() {return _getQuarterWithOptions;}, getQuarter: function getQuarter() {return getQuarter2;}, getOverlappingDaysInIntervals: function getOverlappingDaysInIntervals() {return getOverlappingDaysInIntervals2;}, getMonthWithOptions: function getMonthWithOptions() {return _getMonthWithOptions;}, getMonth: function getMonth() {return getMonth2;}, getMinutesWithOptions: function getMinutesWithOptions() {return _getMinutesWithOptions;}, getMinutes: function getMinutes() {return getMinutes2;}, getMilliseconds: function getMilliseconds() {return getMilliseconds2;}, getISOWeeksInYearWithOptions: function getISOWeeksInYearWithOptions() {return _getISOWeeksInYearWithOptions;}, getISOWeeksInYear: function getISOWeeksInYear() {return getISOWeeksInYear2;}, getISOWeekYearWithOptions: function getISOWeekYearWithOptions() {return _getISOWeekYearWithOptions;}, getISOWeekYear: function getISOWeekYear() {return getISOWeekYear2;}, getISOWeekWithOptions: function getISOWeekWithOptions() {return _getISOWeekWithOptions;}, getISOWeek: function getISOWeek() {return getISOWeek2;}, getISODayWithOptions: function getISODayWithOptions() {return _getISODayWithOptions;}, getISODay: function getISODay() {return getISODay2;}, getHoursWithOptions: function getHoursWithOptions() {return _getHoursWithOptions;}, getHours: function getHours() {return getHours2;}, getDecadeWithOptions: function getDecadeWithOptions() {return _getDecadeWithOptions;}, getDecade: function getDecade() {return getDecade2;}, getDaysInYearWithOptions: function getDaysInYearWithOptions() {return _getDaysInYearWithOptions;}, getDaysInYear: function getDaysInYear() {return getDaysInYear2;}, getDaysInMonthWithOptions: function getDaysInMonthWithOptions() {return _getDaysInMonthWithOptions;}, getDaysInMonth: function getDaysInMonth() {return getDaysInMonth2;}, getDayWithOptions: function getDayWithOptions() {return _getDayWithOptions;}, getDayOfYearWithOptions: function getDayOfYearWithOptions() {return _getDayOfYearWithOptions;}, getDayOfYear: function getDayOfYear() {return getDayOfYear2;}, getDay: function getDay() {return getDay2;}, getDateWithOptions: function getDateWithOptions() {return _getDateWithOptions;}, getDate: function getDate() {return getDate2;}, fromUnixTimeWithOptions: function fromUnixTimeWithOptions() {return _fromUnixTimeWithOptions;}, fromUnixTime: function fromUnixTime() {return fromUnixTime2;}, formatWithOptions: function formatWithOptions() {return _formatWithOptions;}, formatRelativeWithOptions: function formatRelativeWithOptions() {return _formatRelativeWithOptions;}, formatRelative: function formatRelative() {return formatRelative3;}, formatRFC7231: function formatRFC7231() {return formatRFC72312;}, formatRFC3339WithOptions: function formatRFC3339WithOptions() {return _formatRFC3339WithOptions;}, formatRFC3339: function formatRFC3339() {return formatRFC33392;}, formatISOWithOptions: function formatISOWithOptions() {return _formatISOWithOptions;}, formatISODuration: function formatISODuration() {return formatISODuration2;}, formatISO9075WithOptions: function formatISO9075WithOptions() {return _formatISO9075WithOptions;}, formatISO9075: function formatISO9075() {return formatISO90752;}, formatISO: function formatISO() {return formatISO2;}, formatDurationWithOptions: function formatDurationWithOptions() {return _formatDurationWithOptions;}, formatDuration: function formatDuration() {return formatDuration2;}, formatDistanceWithOptions: function formatDistanceWithOptions() {return _formatDistanceWithOptions;}, formatDistanceStrictWithOptions: function formatDistanceStrictWithOptions() {return _formatDistanceStrictWithOptions;}, formatDistanceStrict: function formatDistanceStrict() {return formatDistanceStrict2;}, formatDistance: function formatDistance() {return formatDistance3;}, format: function format() {return format2;}, endOfYearWithOptions: function endOfYearWithOptions() {return _endOfYearWithOptions;}, endOfYear: function endOfYear() {return endOfYear2;}, endOfWeekWithOptions: function endOfWeekWithOptions() {return _endOfWeekWithOptions;}, endOfWeek: function endOfWeek() {return endOfWeek2;}, endOfSecondWithOptions: function endOfSecondWithOptions() {return _endOfSecondWithOptions;}, endOfSecond: function endOfSecond() {return endOfSecond2;}, endOfQuarterWithOptions: function endOfQuarterWithOptions() {return _endOfQuarterWithOptions;}, endOfQuarter: function endOfQuarter() {return endOfQuarter2;}, endOfMonthWithOptions: function endOfMonthWithOptions() {return _endOfMonthWithOptions;}, endOfMonth: function endOfMonth() {return endOfMonth2;}, endOfMinuteWithOptions: function endOfMinuteWithOptions() {return _endOfMinuteWithOptions;}, endOfMinute: function endOfMinute() {return endOfMinute2;}, endOfISOWeekYearWithOptions: function endOfISOWeekYearWithOptions() {return _endOfISOWeekYearWithOptions;}, endOfISOWeekYear: function endOfISOWeekYear() {return endOfISOWeekYear2;}, endOfISOWeekWithOptions: function endOfISOWeekWithOptions() {return _endOfISOWeekWithOptions;}, endOfISOWeek: function endOfISOWeek() {return endOfISOWeek2;}, endOfHourWithOptions: function endOfHourWithOptions() {return _endOfHourWithOptions;}, endOfHour: function endOfHour() {return endOfHour2;}, endOfDecadeWithOptions: function endOfDecadeWithOptions() {return _endOfDecadeWithOptions;}, endOfDecade: function endOfDecade() {return endOfDecade2;}, endOfDayWithOptions: function endOfDayWithOptions() {return _endOfDayWithOptions;}, endOfDay: function endOfDay() {return endOfDay2;}, eachYearOfIntervalWithOptions: function eachYearOfIntervalWithOptions() {return _eachYearOfIntervalWithOptions;}, eachYearOfInterval: function eachYearOfInterval() {return eachYearOfInterval2;}, eachWeekendOfYearWithOptions: function eachWeekendOfYearWithOptions() {return _eachWeekendOfYearWithOptions;}, eachWeekendOfYear: function eachWeekendOfYear() {return eachWeekendOfYear2;}, eachWeekendOfMonthWithOptions: function eachWeekendOfMonthWithOptions() {return _eachWeekendOfMonthWithOptions;}, eachWeekendOfMonth: function eachWeekendOfMonth() {return eachWeekendOfMonth2;}, eachWeekendOfIntervalWithOptions: function eachWeekendOfIntervalWithOptions() {return _eachWeekendOfIntervalWithOptions;}, eachWeekendOfInterval: function eachWeekendOfInterval() {return eachWeekendOfInterval2;}, eachWeekOfIntervalWithOptions: function eachWeekOfIntervalWithOptions() {return _eachWeekOfIntervalWithOptions;}, eachWeekOfInterval: function eachWeekOfInterval() {return eachWeekOfInterval2;}, eachQuarterOfIntervalWithOptions: function eachQuarterOfIntervalWithOptions() {return _eachQuarterOfIntervalWithOptions;}, eachQuarterOfInterval: function eachQuarterOfInterval() {return eachQuarterOfInterval2;}, eachMonthOfIntervalWithOptions: function eachMonthOfIntervalWithOptions() {return _eachMonthOfIntervalWithOptions;}, eachMonthOfInterval: function eachMonthOfInterval() {return eachMonthOfInterval2;}, eachMinuteOfIntervalWithOptions: function eachMinuteOfIntervalWithOptions() {return _eachMinuteOfIntervalWithOptions;}, eachMinuteOfInterval: function eachMinuteOfInterval() {return eachMinuteOfInterval2;}, eachHourOfIntervalWithOptions: function eachHourOfIntervalWithOptions() {return _eachHourOfIntervalWithOptions;}, eachHourOfInterval: function eachHourOfInterval() {return eachHourOfInterval2;}, eachDayOfIntervalWithOptions: function eachDayOfIntervalWithOptions() {return _eachDayOfIntervalWithOptions;}, eachDayOfInterval: function eachDayOfInterval() {return eachDayOfInterval2;}, differenceInYearsWithOptions: function differenceInYearsWithOptions() {return _differenceInYearsWithOptions;}, differenceInYears: function differenceInYears() {return differenceInYears2;}, differenceInWeeksWithOptions: function differenceInWeeksWithOptions() {return _differenceInWeeksWithOptions;}, differenceInWeeks: function differenceInWeeks() {return differenceInWeeks2;}, differenceInSecondsWithOptions: function differenceInSecondsWithOptions() {return _differenceInSecondsWithOptions;}, differenceInSeconds: function differenceInSeconds() {return differenceInSeconds2;}, differenceInQuartersWithOptions: function differenceInQuartersWithOptions() {return _differenceInQuartersWithOptions;}, differenceInQuarters: function differenceInQuarters() {return differenceInQuarters2;}, differenceInMonthsWithOptions: function differenceInMonthsWithOptions() {return _differenceInMonthsWithOptions;}, differenceInMonths: function differenceInMonths() {return differenceInMonths2;}, differenceInMinutesWithOptions: function differenceInMinutesWithOptions() {return _differenceInMinutesWithOptions;}, differenceInMinutes: function differenceInMinutes() {return differenceInMinutes2;}, differenceInMilliseconds: function differenceInMilliseconds() {return differenceInMilliseconds2;}, differenceInISOWeekYearsWithOptions: function differenceInISOWeekYearsWithOptions() {return _differenceInISOWeekYearsWithOptions;}, differenceInISOWeekYears: function differenceInISOWeekYears() {return differenceInISOWeekYears2;}, differenceInHoursWithOptions: function differenceInHoursWithOptions() {return _differenceInHoursWithOptions;}, differenceInHours: function differenceInHours() {return differenceInHours2;}, differenceInDaysWithOptions: function differenceInDaysWithOptions() {return _differenceInDaysWithOptions;}, differenceInDays: function differenceInDays() {return differenceInDays2;}, differenceInCalendarYearsWithOptions: function differenceInCalendarYearsWithOptions() {return _differenceInCalendarYearsWithOptions;}, differenceInCalendarYears: function differenceInCalendarYears() {return differenceInCalendarYears2;}, differenceInCalendarWeeksWithOptions: function differenceInCalendarWeeksWithOptions() {return _differenceInCalendarWeeksWithOptions;}, differenceInCalendarWeeks: function differenceInCalendarWeeks() {return differenceInCalendarWeeks2;}, differenceInCalendarQuartersWithOptions: function differenceInCalendarQuartersWithOptions() {return _differenceInCalendarQuartersWithOptions;}, differenceInCalendarQuarters: function differenceInCalendarQuarters() {return differenceInCalendarQuarters2;}, differenceInCalendarMonthsWithOptions: function differenceInCalendarMonthsWithOptions() {return _differenceInCalendarMonthsWithOptions;}, differenceInCalendarMonths: function differenceInCalendarMonths() {return differenceInCalendarMonths2;}, differenceInCalendarISOWeeksWithOptions: function differenceInCalendarISOWeeksWithOptions() {return _differenceInCalendarISOWeeksWithOptions;}, differenceInCalendarISOWeeks: function differenceInCalendarISOWeeks() {return differenceInCalendarISOWeeks2;}, differenceInCalendarISOWeekYearsWithOptions: function differenceInCalendarISOWeekYearsWithOptions() {return _differenceInCalendarISOWeekYearsWithOptions;}, differenceInCalendarISOWeekYears: function differenceInCalendarISOWeekYears() {return differenceInCalendarISOWeekYears2;}, differenceInCalendarDaysWithOptions: function differenceInCalendarDaysWithOptions() {return _differenceInCalendarDaysWithOptions;}, differenceInCalendarDays: function differenceInCalendarDays() {return differenceInCalendarDays2;}, differenceInBusinessDaysWithOptions: function differenceInBusinessDaysWithOptions() {return _differenceInBusinessDaysWithOptions;}, differenceInBusinessDays: function differenceInBusinessDays() {return differenceInBusinessDays2;}, daysToWeeks: function daysToWeeks() {return daysToWeeks2;}, constructFrom: function constructFrom() {return constructFrom2;}, compareDesc: function compareDesc() {return compareDesc2;}, compareAsc: function compareAsc() {return compareAsc2;}, closestToWithOptions: function closestToWithOptions() {return _closestToWithOptions;}, closestTo: function closestTo() {return closestTo2;}, closestIndexTo: function closestIndexTo() {return closestIndexTo2;}, clampWithOptions: function clampWithOptions() {return _clampWithOptions;}, clamp: function clamp() {return clamp2;}, areIntervalsOverlappingWithOptions: function areIntervalsOverlappingWithOptions() {return _areIntervalsOverlappingWithOptions;}, areIntervalsOverlapping: function areIntervalsOverlapping() {return areIntervalsOverlapping2;}, addYearsWithOptions: function addYearsWithOptions() {return _addYearsWithOptions;}, addYears: function addYears() {return addYears2;}, addWithOptions: function addWithOptions() {return _addWithOptions;}, addWeeksWithOptions: function addWeeksWithOptions() {return _addWeeksWithOptions;}, addWeeks: function addWeeks() {return addWeeks2;}, addSecondsWithOptions: function addSecondsWithOptions() {return _addSecondsWithOptions;}, addSeconds: function addSeconds() {return addSeconds2;}, addQuartersWithOptions: function addQuartersWithOptions() {return _addQuartersWithOptions;}, addQuarters: function addQuarters() {return addQuarters2;}, addMonthsWithOptions: function addMonthsWithOptions() {return _addMonthsWithOptions;}, addMonths: function addMonths() {return addMonths2;}, addMinutesWithOptions: function addMinutesWithOptions() {return _addMinutesWithOptions;}, addMinutes: function addMinutes() {return addMinutes2;}, addMillisecondsWithOptions: function addMillisecondsWithOptions() {return _addMillisecondsWithOptions;}, addMilliseconds: function addMilliseconds() {return addMilliseconds2;}, addISOWeekYearsWithOptions: function addISOWeekYearsWithOptions() {return _addISOWeekYearsWithOptions;}, addISOWeekYears: function addISOWeekYears() {return addISOWeekYears2;}, addHoursWithOptions: function addHoursWithOptions() {return _addHoursWithOptions;}, addHours: function addHours() {return addHours2;}, addDaysWithOptions: function addDaysWithOptions() {return _addDaysWithOptions;}, addDays: function addDays() {return addDays2;}, addBusinessDaysWithOptions: function addBusinessDaysWithOptions() {return _addBusinessDaysWithOptions;}, addBusinessDays: function addBusinessDays() {return addBusinessDays2;}, add: function add() {return add2;} }); // lib/constants.js var daysInWeek = 7; var daysInYear = 365.2425; var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000; var minTime = -maxTime; var millisecondsInWeek = 604800000; var millisecondsInDay = 86400000; var millisecondsInMinute = 60000; var millisecondsInHour = 3600000; var millisecondsInSecond = 1000; var minutesInYear = 525600; var minutesInMonth = 43200; var minutesInDay = 1440; var minutesInHour = 60; var monthsInQuarter = 3; var monthsInYear = 12; var quartersInYear = 4; var secondsInHour = 3600; var secondsInMinute = 60; var secondsInDay = secondsInHour * 24; var secondsInWeek = secondsInDay * 7; var secondsInYear = secondsInDay * daysInYear; var secondsInMonth = secondsInYear / 12; var secondsInQuarter = secondsInMonth * 3; var constructFromSymbol = Symbol.for("constructDateFrom"); // lib/constructFrom.js function constructFrom(date, value) { if (typeof date === "function") return date(value); if (date && _typeof(date) === "object" && constructFromSymbol in date) return date[constructFromSymbol](value); if (date instanceof Date) return new date.constructor(value); return new Date(value); } // lib/toDate.js function toDate(argument, context) { return constructFrom(context || argument, argument); } // lib/addDays.js function addDays(date, amount, options) { var _date = toDate(date, options === null || options === void 0 ? void 0 : options.in); if (isNaN(amount)) return constructFrom((options === null || options === void 0 ? void 0 : options.in) || date, NaN); if (!amount) return _date; _date.setDate(_date.getDate() + amount); return _date; } // lib/addMonths.js function addMonths(date, amount, options) { var _date = toDate(date, options === null || options === void 0 ? void 0 : options.in); if (isNaN(amount)) return constructFrom((options === null || options === void 0 ? void 0 : options.in) || date, NaN); if (!amount) { return _date; } var dayOfMonth = _date.getDate(); var endOfDesiredMonth = constructFrom((options === null || options === void 0 ? void 0 : options.in) || date, _date.getTime()); endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0); var daysInMonth = endOfDesiredMonth.getDate(); if (dayOfMonth >= daysInMonth) { return endOfDesiredMonth; } else { _date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth); return _date; } } // lib/add.js function add(date, duration, options) { var _duration$years = duration.years,years = _duration$years === void 0 ? 0 : _duration$years,_duration$months = duration.months,months = _duration$months === void 0 ? 0 : _duration$months,_duration$weeks = duration.weeks,weeks = _duration$weeks === void 0 ? 0 : _duration$weeks,_duration$days = duration.days,days = _duration$days === void 0 ? 0 : _duration$days,_duration$hours = duration.hours,hours = _duration$hours === void 0 ? 0 : _duration$hours,_duration$minutes = duration.minutes,minutes = _duration$minutes === void 0 ? 0 : _duration$minutes,_duration$seconds = duration.seconds,seconds = _duration$seconds === void 0 ? 0 : _duration$seconds; var _date = toDate(date, options === null || options === void 0 ? void 0 : options.in); var dateWithMonths = months || years ? addMonths(_date, months + years * 12) : _date; var dateWithDays = days || weeks ? addDays(dateWithMonths, days + weeks * 7) : dateWithMonths; var minutesToAdd = minutes + hours * 60; var secondsToAdd = seconds + minutesToAdd * 60; var msToAdd = secondsToAdd * 1000; return constructFrom((options === null || options === void 0 ? void 0 : options.in) || date, +dateWithDays + msToAdd); } // lib/fp/_lib/convertToFP.js function convertToFP(fn, arity) {var curriedArgs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; return curriedArgs.length >= arity ? fn.apply(void 0, _toConsumableArray(curriedArgs.slice(0, arity).reverse())) : function () {for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {args[_key] = arguments[_key];}return convertToFP(fn, arity, curriedArgs.concat(args));}; } // lib/fp/add.js var add2 = convertToFP(add, 2); // lib/isSaturday.js function isSaturday(date, options) { return toDate(date, options === null || options === void 0 ? void 0 : options.in).getDay() === 6; } // lib/isSunday.js function isSunday(date, options) { return toDate(date, options === null || options === void 0 ? void 0 : options.in).getDay() === 0; } // lib/isWeekend.js function isWeekend(date, options) { var day = toDate(date, options === null || options === void 0 ? void 0 : options.in).getDay(); return day === 0 || day === 6; } // lib/addBusinessDays.js function addBusinessDays(date, amount, options) { var _date = toDate(date, options === null || options === void 0 ? void 0 : options.in); var startedOnWeekend = isWeekend(_date, options); if (isNaN(amount)) return constructFrom(options === null || options === void 0 ? void 0 : options.in, NaN); var hours = _date.getHours(); var sign = amount < 0 ? -1 : 1; var fullWeeks = Math.trunc(amount / 5); _date.setDate(_date.getDate() + fullWeeks * 7); var restDays = Math.abs(amount % 5); while (restDays > 0) { _date.setDate(_date.getDate() + sign); if (!isWeekend(_date, options)) restDays -= 1; } if (startedOnWeekend && isWeekend(_date, options) && amount !== 0) { if (isSaturday(_date, options)) _date.setDate(_date.getDate() + (sign < 0 ? 2 : -1)); if (isSunday(_date, options)) _date.setDate(_date.getDate() + (sign < 0 ? 1 : -2)); } _date.setHours(hours); return _date; } // lib/fp/addBusinessDays.js var addBusinessDays2 = convertToFP(addBusinessDays, 2); // lib/fp/addBusinessDaysWithOptions.js var _addBusinessDaysWithOptions = convertToFP(addBusinessDays, 3); // lib/fp/addDays.js var addDays2 = convertToFP(addDays, 2); // lib/fp/addDaysWithOptions.js var _addDaysWithOptions = convertToFP(addDays, 3); // lib/addMilliseconds.js function addMilliseconds(date, amount, options) { return constructFrom((options === null || options === void 0 ? void 0 : options.in) || date, +toDate(date) + amount); } // lib/addHours.js function addHours(date, amount, options) { return addMilliseconds(date, amount * millisecondsInHour, options); } // lib/fp/addHours.js var addHours2 = convertToFP(addHours, 2); // lib/fp/addHoursWithOptions.js var _addHoursWithOptions = convertToFP(addHours, 3); // lib/_lib/defaultOptions.js var defaultOptions = {}; function getDefaultOptions() { return defaultOptions; } function setDefaultOptions(newOptions) { defaultOptions = newOptions; } // lib/startOfWeek.js function startOfWeek(date, options) {var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _defaultOptions2$loca; var defaultOptions2 = getDefaultOptions(); var weekStartsOn = (_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 || (_options$locale = options.locale) === null || _options$locale === void 0 || (_options$locale = _options$locale.options) === null || _options$locale === void 0 ? void 0 : _options$locale.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions2$loca = defaultOptions2.locale) === null || _defaultOptions2$loca === void 0 || (_defaultOptions2$loca = _defaultOptions2$loca.options) === null || _defaultOptions2$loca === void 0 ? void 0 : _defaultOptions2$loca.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0; var _date = toDate(date, options === null || options === void 0 ? void 0 : options.in); var day = _date.getDay(); var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn; _date.setDate(_date.getDate() - diff); _date.setHours(0, 0, 0, 0); return _date; } // lib/startOfISOWeek.js function startOfISOWeek(date, options) { return startOfWeek(date, _objectSpread(_objectSpread({}, options), {}, { weekStartsOn: 1 })); } // lib/getISOWeekYear.js function getISOWeekYear(date, options) { var _date = toDate(date, options === null || options === void 0 ? void 0 : options.in); var year = _date.getFullYear(); var fourthOfJanuaryOfNextYear = constructFrom(_date, 0); fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4); fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0); var startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear); var fourthOfJanuaryOfThisYear = constructFrom(_date, 0); fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4); fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0); var startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear); if (_date.getTime() >= startOfNextYear.getTime()) { return year + 1; } else if (_date.getTime() >= startOfThisYear.getTime()) { return year; } else { return year - 1; } } // lib/_lib/getTimezoneOffsetInMilliseconds.js function getTimezoneOffsetInMilliseconds(date) { var _date = toDate(date); var utcDate = new Date(Date.UTC(_date.getFullYear(), _date.getMonth(), _date.getDate(), _date.getHours(), _date.getMinutes(), _date.getSeconds(), _date.getMilliseconds())); utcDate.setUTCFullYear(_date.getFullYear()); return +date - +utcDate; } // lib/_lib/normalizeDates.js function normalizeDates(context) {for (var _len2 = arguments.length, dates = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {dates[_key2 - 1] = arguments[_key2];} var normalize = constructFrom.bind(null, context || dates.find(function (date) {return _typeof(date) === "object";})); return dates.map(normalize); } // lib/startOfDay.js function startOfDay(date, options) { var _date = toDate(date, options === null || options === void 0 ? void 0 : options.in); _date.setHours(0, 0, 0, 0); return _date; } // lib/differenceInCalendarDays.js function differenceInCalendarDays(laterDate, earlierDate, options) { var _normalizeDates = normalizeDates(options === null || options === void 0 ? void 0 : options.in, laterDate, earlierDate),_normalizeDates2 = _slicedToArray(_normalizeDates, 2),laterDate_ = _normalizeDates2[0],earlierDate_ = _normalizeDates2[1]; var laterStartOfDay = startOfDay(laterDate_); var earlierStartOfDay = startOfDay(earlierDate_); var laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);