aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/date-fns/_lib
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-06-28 17:26:46 -0700
committerPinapelz <yukais@pinapelz.com>2025-06-28 17:43:56 -0700
commite4fa1e69e7ebfb627c7198fd1a9881e9327ec4d4 (patch)
tree06284a538a6008eca75051399e47db4e5d50301c /node_modules/date-fns/_lib
initial commit: scaffolding
Diffstat (limited to 'node_modules/date-fns/_lib')
-rw-r--r--node_modules/date-fns/_lib/addLeadingZeros/index.js15
-rw-r--r--node_modules/date-fns/_lib/assign/index.js19
-rw-r--r--node_modules/date-fns/_lib/cloneObject/index.js12
-rw-r--r--node_modules/date-fns/_lib/defaultLocale/index.js11
-rw-r--r--node_modules/date-fns/_lib/defaultOptions/index.js14
-rw-r--r--node_modules/date-fns/_lib/format/formatters/index.js781
-rw-r--r--node_modules/date-fns/_lib/format/lightFormatters/index.js90
-rw-r--r--node_modules/date-fns/_lib/format/longFormatters/index.js88
-rw-r--r--node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds/index.js23
-rw-r--r--node_modules/date-fns/_lib/getUTCDayOfYear/index.js21
-rw-r--r--node_modules/date-fns/_lib/getUTCISOWeek/index.js23
-rw-r--r--node_modules/date-fns/_lib/getUTCISOWeekYear/index.js31
-rw-r--r--node_modules/date-fns/_lib/getUTCWeek/index.js23
-rw-r--r--node_modules/date-fns/_lib/getUTCWeekYear/index.js41
-rw-r--r--node_modules/date-fns/_lib/isSameUTCWeek/index.js16
-rw-r--r--node_modules/date-fns/_lib/protectedTokens/index.js27
-rw-r--r--node_modules/date-fns/_lib/requiredArgs/index.js12
-rw-r--r--node_modules/date-fns/_lib/roundingMethods/index.js19
-rw-r--r--node_modules/date-fns/_lib/setUTCDay/index.js31
-rw-r--r--node_modules/date-fns/_lib/setUTCISODay/index.js26
-rw-r--r--node_modules/date-fns/_lib/setUTCISOWeek/index.js20
-rw-r--r--node_modules/date-fns/_lib/setUTCWeek/index.js20
-rw-r--r--node_modules/date-fns/_lib/startOfUTCISOWeek/index.js20
-rw-r--r--node_modules/date-fns/_lib/startOfUTCISOWeekYear/index.js20
-rw-r--r--node_modules/date-fns/_lib/startOfUTCWeek/index.js29
-rw-r--r--node_modules/date-fns/_lib/startOfUTCWeekYear/index.js25
-rw-r--r--node_modules/date-fns/_lib/test/index.js33
-rw-r--r--node_modules/date-fns/_lib/toInteger/index.js17
28 files changed, 1507 insertions, 0 deletions
diff --git a/node_modules/date-fns/_lib/addLeadingZeros/index.js b/node_modules/date-fns/_lib/addLeadingZeros/index.js
new file mode 100644
index 0000000..ead9537
--- /dev/null
+++ b/node_modules/date-fns/_lib/addLeadingZeros/index.js
@@ -0,0 +1,15 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = addLeadingZeros;
+function addLeadingZeros(number, targetLength) {
+ var sign = number < 0 ? '-' : '';
+ var output = Math.abs(number).toString();
+ while (output.length < targetLength) {
+ output = '0' + output;
+ }
+ return sign + output;
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/assign/index.js b/node_modules/date-fns/_lib/assign/index.js
new file mode 100644
index 0000000..d3bdaa7
--- /dev/null
+++ b/node_modules/date-fns/_lib/assign/index.js
@@ -0,0 +1,19 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = assign;
+function assign(target, object) {
+ if (target == null) {
+ throw new TypeError('assign requires that input parameter not be null or undefined');
+ }
+ for (var property in object) {
+ if (Object.prototype.hasOwnProperty.call(object, property)) {
+ ;
+ target[property] = object[property];
+ }
+ }
+ return target;
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/cloneObject/index.js b/node_modules/date-fns/_lib/cloneObject/index.js
new file mode 100644
index 0000000..49c9e21
--- /dev/null
+++ b/node_modules/date-fns/_lib/cloneObject/index.js
@@ -0,0 +1,12 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = cloneObject;
+var _index = _interopRequireDefault(require("../assign/index.js"));
+function cloneObject(object) {
+ return (0, _index.default)({}, object);
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/defaultLocale/index.js b/node_modules/date-fns/_lib/defaultLocale/index.js
new file mode 100644
index 0000000..a5f190c
--- /dev/null
+++ b/node_modules/date-fns/_lib/defaultLocale/index.js
@@ -0,0 +1,11 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _index = _interopRequireDefault(require("../../locale/en-US/index.js"));
+var _default = _index.default;
+exports.default = _default;
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/defaultOptions/index.js b/node_modules/date-fns/_lib/defaultOptions/index.js
new file mode 100644
index 0000000..fc24b0d
--- /dev/null
+++ b/node_modules/date-fns/_lib/defaultOptions/index.js
@@ -0,0 +1,14 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.getDefaultOptions = getDefaultOptions;
+exports.setDefaultOptions = setDefaultOptions;
+var defaultOptions = {};
+function getDefaultOptions() {
+ return defaultOptions;
+}
+function setDefaultOptions(newOptions) {
+ defaultOptions = newOptions;
+} \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/format/formatters/index.js b/node_modules/date-fns/_lib/format/formatters/index.js
new file mode 100644
index 0000000..6b68efd
--- /dev/null
+++ b/node_modules/date-fns/_lib/format/formatters/index.js
@@ -0,0 +1,781 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _index = _interopRequireDefault(require("../../../_lib/getUTCDayOfYear/index.js"));
+var _index2 = _interopRequireDefault(require("../../../_lib/getUTCISOWeek/index.js"));
+var _index3 = _interopRequireDefault(require("../../../_lib/getUTCISOWeekYear/index.js"));
+var _index4 = _interopRequireDefault(require("../../../_lib/getUTCWeek/index.js"));
+var _index5 = _interopRequireDefault(require("../../../_lib/getUTCWeekYear/index.js"));
+var _index6 = _interopRequireDefault(require("../../addLeadingZeros/index.js"));
+var _index7 = _interopRequireDefault(require("../lightFormatters/index.js"));
+var dayPeriodEnum = {
+ am: 'am',
+ pm: 'pm',
+ midnight: 'midnight',
+ noon: 'noon',
+ morning: 'morning',
+ afternoon: 'afternoon',
+ evening: 'evening',
+ night: 'night'
+};
+/*
+ * | | Unit | | Unit |
+ * |-----|--------------------------------|-----|--------------------------------|
+ * | a | AM, PM | A* | Milliseconds in day |
+ * | b | AM, PM, noon, midnight | B | Flexible day period |
+ * | c | Stand-alone local day of week | C* | Localized hour w/ day period |
+ * | d | Day of month | D | Day of year |
+ * | e | Local day of week | E | Day of week |
+ * | f | | F* | Day of week in month |
+ * | g* | Modified Julian day | G | Era |
+ * | h | Hour [1-12] | H | Hour [0-23] |
+ * | i! | ISO day of week | I! | ISO week of year |
+ * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
+ * | k | Hour [1-24] | K | Hour [0-11] |
+ * | l* | (deprecated) | L | Stand-alone month |
+ * | m | Minute | M | Month |
+ * | n | | N | |
+ * | o! | Ordinal number modifier | O | Timezone (GMT) |
+ * | p! | Long localized time | P! | Long localized date |
+ * | q | Stand-alone quarter | Q | Quarter |
+ * | r* | Related Gregorian year | R! | ISO week-numbering year |
+ * | s | Second | S | Fraction of second |
+ * | t! | Seconds timestamp | T! | Milliseconds timestamp |
+ * | u | Extended year | U* | Cyclic year |
+ * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
+ * | w | Local week of year | W* | Week of month |
+ * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
+ * | y | Year (abs) | Y | Local week-numbering year |
+ * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
+ *
+ * Letters marked by * are not implemented but reserved by Unicode standard.
+ *
+ * Letters marked by ! are non-standard, but implemented by date-fns:
+ * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
+ * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
+ * i.e. 7 for Sunday, 1 for Monday, etc.
+ * - `I` is ISO week of year, as opposed to `w` which is local week of year.
+ * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
+ * `R` is supposed to be used in conjunction with `I` and `i`
+ * for universal ISO week-numbering date, whereas
+ * `Y` is supposed to be used in conjunction with `w` and `e`
+ * for week-numbering date specific to the locale.
+ * - `P` is long localized date format
+ * - `p` is long localized time format
+ */
+
+var formatters = {
+ // Era
+ G: function G(date, token, localize) {
+ var era = date.getUTCFullYear() > 0 ? 1 : 0;
+ switch (token) {
+ // AD, BC
+ case 'G':
+ case 'GG':
+ case 'GGG':
+ return localize.era(era, {
+ width: 'abbreviated'
+ });
+ // A, B
+ case 'GGGGG':
+ return localize.era(era, {
+ width: 'narrow'
+ });
+ // Anno Domini, Before Christ
+ case 'GGGG':
+ default:
+ return localize.era(era, {
+ width: 'wide'
+ });
+ }
+ },
+ // Year
+ y: function y(date, token, localize) {
+ // Ordinal number
+ if (token === 'yo') {
+ var signedYear = date.getUTCFullYear();
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
+ return localize.ordinalNumber(year, {
+ unit: 'year'
+ });
+ }
+ return _index7.default.y(date, token);
+ },
+ // Local week-numbering year
+ Y: function Y(date, token, localize, options) {
+ var signedWeekYear = (0, _index5.default)(date, options);
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
+ var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
+
+ // Two digit year
+ if (token === 'YY') {
+ var twoDigitYear = weekYear % 100;
+ return (0, _index6.default)(twoDigitYear, 2);
+ }
+
+ // Ordinal number
+ if (token === 'Yo') {
+ return localize.ordinalNumber(weekYear, {
+ unit: 'year'
+ });
+ }
+
+ // Padding
+ return (0, _index6.default)(weekYear, token.length);
+ },
+ // ISO week-numbering year
+ R: function R(date, token) {
+ var isoWeekYear = (0, _index3.default)(date);
+
+ // Padding
+ return (0, _index6.default)(isoWeekYear, token.length);
+ },
+ // Extended year. This is a single number designating the year of this calendar system.
+ // The main difference between `y` and `u` localizers are B.C. years:
+ // | Year | `y` | `u` |
+ // |------|-----|-----|
+ // | AC 1 | 1 | 1 |
+ // | BC 1 | 1 | 0 |
+ // | BC 2 | 2 | -1 |
+ // Also `yy` always returns the last two digits of a year,
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
+ u: function u(date, token) {
+ var year = date.getUTCFullYear();
+ return (0, _index6.default)(year, token.length);
+ },
+ // Quarter
+ Q: function Q(date, token, localize) {
+ var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
+ switch (token) {
+ // 1, 2, 3, 4
+ case 'Q':
+ return String(quarter);
+ // 01, 02, 03, 04
+ case 'QQ':
+ return (0, _index6.default)(quarter, 2);
+ // 1st, 2nd, 3rd, 4th
+ case 'Qo':
+ return localize.ordinalNumber(quarter, {
+ unit: 'quarter'
+ });
+ // Q1, Q2, Q3, Q4
+ case 'QQQ':
+ return localize.quarter(quarter, {
+ width: 'abbreviated',
+ context: 'formatting'
+ });
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
+ case 'QQQQQ':
+ return localize.quarter(quarter, {
+ width: 'narrow',
+ context: 'formatting'
+ });
+ // 1st quarter, 2nd quarter, ...
+ case 'QQQQ':
+ default:
+ return localize.quarter(quarter, {
+ width: 'wide',
+ context: 'formatting'
+ });
+ }
+ },
+ // Stand-alone quarter
+ q: function q(date, token, localize) {
+ var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
+ switch (token) {
+ // 1, 2, 3, 4
+ case 'q':
+ return String(quarter);
+ // 01, 02, 03, 04
+ case 'qq':
+ return (0, _index6.default)(quarter, 2);
+ // 1st, 2nd, 3rd, 4th
+ case 'qo':
+ return localize.ordinalNumber(quarter, {
+ unit: 'quarter'
+ });
+ // Q1, Q2, Q3, Q4
+ case 'qqq':
+ return localize.quarter(quarter, {
+ width: 'abbreviated',
+ context: 'standalone'
+ });
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
+ case 'qqqqq':
+ return localize.quarter(quarter, {
+ width: 'narrow',
+ context: 'standalone'
+ });
+ // 1st quarter, 2nd quarter, ...
+ case 'qqqq':
+ default:
+ return localize.quarter(quarter, {
+ width: 'wide',
+ context: 'standalone'
+ });
+ }
+ },
+ // Month
+ M: function M(date, token, localize) {
+ var month = date.getUTCMonth();
+ switch (token) {
+ case 'M':
+ case 'MM':
+ return _index7.default.M(date, token);
+ // 1st, 2nd, ..., 12th
+ case 'Mo':
+ return localize.ordinalNumber(month + 1, {
+ unit: 'month'
+ });
+ // Jan, Feb, ..., Dec
+ case 'MMM':
+ return localize.month(month, {
+ width: 'abbreviated',
+ context: 'formatting'
+ });
+ // J, F, ..., D
+ case 'MMMMM':
+ return localize.month(month, {
+ width: 'narrow',
+ context: 'formatting'
+ });
+ // January, February, ..., December
+ case 'MMMM':
+ default:
+ return localize.month(month, {
+ width: 'wide',
+ context: 'formatting'
+ });
+ }
+ },
+ // Stand-alone month
+ L: function L(date, token, localize) {
+ var month = date.getUTCMonth();
+ switch (token) {
+ // 1, 2, ..., 12
+ case 'L':
+ return String(month + 1);
+ // 01, 02, ..., 12
+ case 'LL':
+ return (0, _index6.default)(month + 1, 2);
+ // 1st, 2nd, ..., 12th
+ case 'Lo':
+ return localize.ordinalNumber(month + 1, {
+ unit: 'month'
+ });
+ // Jan, Feb, ..., Dec
+ case 'LLL':
+ return localize.month(month, {
+ width: 'abbreviated',
+ context: 'standalone'
+ });
+ // J, F, ..., D
+ case 'LLLLL':
+ return localize.month(month, {
+ width: 'narrow',
+ context: 'standalone'
+ });
+ // January, February, ..., December
+ case 'LLLL':
+ default:
+ return localize.month(month, {
+ width: 'wide',
+ context: 'standalone'
+ });
+ }
+ },
+ // Local week of year
+ w: function w(date, token, localize, options) {
+ var week = (0, _index4.default)(date, options);
+ if (token === 'wo') {
+ return localize.ordinalNumber(week, {
+ unit: 'week'
+ });
+ }
+ return (0, _index6.default)(week, token.length);
+ },
+ // ISO week of year
+ I: function I(date, token, localize) {
+ var isoWeek = (0, _index2.default)(date);
+ if (token === 'Io') {
+ return localize.ordinalNumber(isoWeek, {
+ unit: 'week'
+ });
+ }
+ return (0, _index6.default)(isoWeek, token.length);
+ },
+ // Day of the month
+ d: function d(date, token, localize) {
+ if (token === 'do') {
+ return localize.ordinalNumber(date.getUTCDate(), {
+ unit: 'date'
+ });
+ }
+ return _index7.default.d(date, token);
+ },
+ // Day of year
+ D: function D(date, token, localize) {
+ var dayOfYear = (0, _index.default)(date);
+ if (token === 'Do') {
+ return localize.ordinalNumber(dayOfYear, {
+ unit: 'dayOfYear'
+ });
+ }
+ return (0, _index6.default)(dayOfYear, token.length);
+ },
+ // Day of week
+ E: function E(date, token, localize) {
+ var dayOfWeek = date.getUTCDay();
+ switch (token) {
+ // Tue
+ case 'E':
+ case 'EE':
+ case 'EEE':
+ return localize.day(dayOfWeek, {
+ width: 'abbreviated',
+ context: 'formatting'
+ });
+ // T
+ case 'EEEEE':
+ return localize.day(dayOfWeek, {
+ width: 'narrow',
+ context: 'formatting'
+ });
+ // Tu
+ case 'EEEEEE':
+ return localize.day(dayOfWeek, {
+ width: 'short',
+ context: 'formatting'
+ });
+ // Tuesday
+ case 'EEEE':
+ default:
+ return localize.day(dayOfWeek, {
+ width: 'wide',
+ context: 'formatting'
+ });
+ }
+ },
+ // Local day of week
+ e: function e(date, token, localize, options) {
+ var dayOfWeek = date.getUTCDay();
+ var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
+ switch (token) {
+ // Numerical value (Nth day of week with current locale or weekStartsOn)
+ case 'e':
+ return String(localDayOfWeek);
+ // Padded numerical value
+ case 'ee':
+ return (0, _index6.default)(localDayOfWeek, 2);
+ // 1st, 2nd, ..., 7th
+ case 'eo':
+ return localize.ordinalNumber(localDayOfWeek, {
+ unit: 'day'
+ });
+ case 'eee':
+ return localize.day(dayOfWeek, {
+ width: 'abbreviated',
+ context: 'formatting'
+ });
+ // T
+ case 'eeeee':
+ return localize.day(dayOfWeek, {
+ width: 'narrow',
+ context: 'formatting'
+ });
+ // Tu
+ case 'eeeeee':
+ return localize.day(dayOfWeek, {
+ width: 'short',
+ context: 'formatting'
+ });
+ // Tuesday
+ case 'eeee':
+ default:
+ return localize.day(dayOfWeek, {
+ width: 'wide',
+ context: 'formatting'
+ });
+ }
+ },
+ // Stand-alone local day of week
+ c: function c(date, token, localize, options) {
+ var dayOfWeek = date.getUTCDay();
+ var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
+ switch (token) {
+ // Numerical value (same as in `e`)
+ case 'c':
+ return String(localDayOfWeek);
+ // Padded numerical value
+ case 'cc':
+ return (0, _index6.default)(localDayOfWeek, token.length);
+ // 1st, 2nd, ..., 7th
+ case 'co':
+ return localize.ordinalNumber(localDayOfWeek, {
+ unit: 'day'
+ });
+ case 'ccc':
+ return localize.day(dayOfWeek, {
+ width: 'abbreviated',
+ context: 'standalone'
+ });
+ // T
+ case 'ccccc':
+ return localize.day(dayOfWeek, {
+ width: 'narrow',
+ context: 'standalone'
+ });
+ // Tu
+ case 'cccccc':
+ return localize.day(dayOfWeek, {
+ width: 'short',
+ context: 'standalone'
+ });
+ // Tuesday
+ case 'cccc':
+ default:
+ return localize.day(dayOfWeek, {
+ width: 'wide',
+ context: 'standalone'
+ });
+ }
+ },
+ // ISO day of week
+ i: function i(date, token, localize) {
+ var dayOfWeek = date.getUTCDay();
+ var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
+ switch (token) {
+ // 2
+ case 'i':
+ return String(isoDayOfWeek);
+ // 02
+ case 'ii':
+ return (0, _index6.default)(isoDayOfWeek, token.length);
+ // 2nd
+ case 'io':
+ return localize.ordinalNumber(isoDayOfWeek, {
+ unit: 'day'
+ });
+ // Tue
+ case 'iii':
+ return localize.day(dayOfWeek, {
+ width: 'abbreviated',
+ context: 'formatting'
+ });
+ // T
+ case 'iiiii':
+ return localize.day(dayOfWeek, {
+ width: 'narrow',
+ context: 'formatting'
+ });
+ // Tu
+ case 'iiiiii':
+ return localize.day(dayOfWeek, {
+ width: 'short',
+ context: 'formatting'
+ });
+ // Tuesday
+ case 'iiii':
+ default:
+ return localize.day(dayOfWeek, {
+ width: 'wide',
+ context: 'formatting'
+ });
+ }
+ },
+ // AM or PM
+ a: function a(date, token, localize) {
+ var hours = date.getUTCHours();
+ var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
+ switch (token) {
+ case 'a':
+ case 'aa':
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'abbreviated',
+ context: 'formatting'
+ });
+ case 'aaa':
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'abbreviated',
+ context: 'formatting'
+ }).toLowerCase();
+ case 'aaaaa':
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'narrow',
+ context: 'formatting'
+ });
+ case 'aaaa':
+ default:
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'wide',
+ context: 'formatting'
+ });
+ }
+ },
+ // AM, PM, midnight, noon
+ b: function b(date, token, localize) {
+ var hours = date.getUTCHours();
+ var dayPeriodEnumValue;
+ if (hours === 12) {
+ dayPeriodEnumValue = dayPeriodEnum.noon;
+ } else if (hours === 0) {
+ dayPeriodEnumValue = dayPeriodEnum.midnight;
+ } else {
+ dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
+ }
+ switch (token) {
+ case 'b':
+ case 'bb':
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'abbreviated',
+ context: 'formatting'
+ });
+ case 'bbb':
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'abbreviated',
+ context: 'formatting'
+ }).toLowerCase();
+ case 'bbbbb':
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'narrow',
+ context: 'formatting'
+ });
+ case 'bbbb':
+ default:
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'wide',
+ context: 'formatting'
+ });
+ }
+ },
+ // in the morning, in the afternoon, in the evening, at night
+ B: function B(date, token, localize) {
+ var hours = date.getUTCHours();
+ var dayPeriodEnumValue;
+ if (hours >= 17) {
+ dayPeriodEnumValue = dayPeriodEnum.evening;
+ } else if (hours >= 12) {
+ dayPeriodEnumValue = dayPeriodEnum.afternoon;
+ } else if (hours >= 4) {
+ dayPeriodEnumValue = dayPeriodEnum.morning;
+ } else {
+ dayPeriodEnumValue = dayPeriodEnum.night;
+ }
+ switch (token) {
+ case 'B':
+ case 'BB':
+ case 'BBB':
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'abbreviated',
+ context: 'formatting'
+ });
+ case 'BBBBB':
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'narrow',
+ context: 'formatting'
+ });
+ case 'BBBB':
+ default:
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'wide',
+ context: 'formatting'
+ });
+ }
+ },
+ // Hour [1-12]
+ h: function h(date, token, localize) {
+ if (token === 'ho') {
+ var hours = date.getUTCHours() % 12;
+ if (hours === 0) hours = 12;
+ return localize.ordinalNumber(hours, {
+ unit: 'hour'
+ });
+ }
+ return _index7.default.h(date, token);
+ },
+ // Hour [0-23]
+ H: function H(date, token, localize) {
+ if (token === 'Ho') {
+ return localize.ordinalNumber(date.getUTCHours(), {
+ unit: 'hour'
+ });
+ }
+ return _index7.default.H(date, token);
+ },
+ // Hour [0-11]
+ K: function K(date, token, localize) {
+ var hours = date.getUTCHours() % 12;
+ if (token === 'Ko') {
+ return localize.ordinalNumber(hours, {
+ unit: 'hour'
+ });
+ }
+ return (0, _index6.default)(hours, token.length);
+ },
+ // Hour [1-24]
+ k: function k(date, token, localize) {
+ var hours = date.getUTCHours();
+ if (hours === 0) hours = 24;
+ if (token === 'ko') {
+ return localize.ordinalNumber(hours, {
+ unit: 'hour'
+ });
+ }
+ return (0, _index6.default)(hours, token.length);
+ },
+ // Minute
+ m: function m(date, token, localize) {
+ if (token === 'mo') {
+ return localize.ordinalNumber(date.getUTCMinutes(), {
+ unit: 'minute'
+ });
+ }
+ return _index7.default.m(date, token);
+ },
+ // Second
+ s: function s(date, token, localize) {
+ if (token === 'so') {
+ return localize.ordinalNumber(date.getUTCSeconds(), {
+ unit: 'second'
+ });
+ }
+ return _index7.default.s(date, token);
+ },
+ // Fraction of second
+ S: function S(date, token) {
+ return _index7.default.S(date, token);
+ },
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
+ X: function X(date, token, _localize, options) {
+ var originalDate = options._originalDate || date;
+ var timezoneOffset = originalDate.getTimezoneOffset();
+ if (timezoneOffset === 0) {
+ return 'Z';
+ }
+ switch (token) {
+ // Hours and optional minutes
+ case 'X':
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
+
+ // Hours, minutes and optional seconds without `:` delimiter
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
+ // so this token always has the same output as `XX`
+ case 'XXXX':
+ case 'XX':
+ // Hours and minutes without `:` delimiter
+ return formatTimezone(timezoneOffset);
+
+ // Hours, minutes and optional seconds with `:` delimiter
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
+ // so this token always has the same output as `XXX`
+ case 'XXXXX':
+ case 'XXX': // Hours and minutes with `:` delimiter
+ default:
+ return formatTimezone(timezoneOffset, ':');
+ }
+ },
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
+ x: function x(date, token, _localize, options) {
+ var originalDate = options._originalDate || date;
+ var timezoneOffset = originalDate.getTimezoneOffset();
+ switch (token) {
+ // Hours and optional minutes
+ case 'x':
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
+
+ // Hours, minutes and optional seconds without `:` delimiter
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
+ // so this token always has the same output as `xx`
+ case 'xxxx':
+ case 'xx':
+ // Hours and minutes without `:` delimiter
+ return formatTimezone(timezoneOffset);
+
+ // Hours, minutes and optional seconds with `:` delimiter
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
+ // so this token always has the same output as `xxx`
+ case 'xxxxx':
+ case 'xxx': // Hours and minutes with `:` delimiter
+ default:
+ return formatTimezone(timezoneOffset, ':');
+ }
+ },
+ // Timezone (GMT)
+ O: function O(date, token, _localize, options) {
+ var originalDate = options._originalDate || date;
+ var timezoneOffset = originalDate.getTimezoneOffset();
+ switch (token) {
+ // Short
+ case 'O':
+ case 'OO':
+ case 'OOO':
+ return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
+ // Long
+ case 'OOOO':
+ default:
+ return 'GMT' + formatTimezone(timezoneOffset, ':');
+ }
+ },
+ // Timezone (specific non-location)
+ z: function z(date, token, _localize, options) {
+ var originalDate = options._originalDate || date;
+ var timezoneOffset = originalDate.getTimezoneOffset();
+ switch (token) {
+ // Short
+ case 'z':
+ case 'zz':
+ case 'zzz':
+ return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
+ // Long
+ case 'zzzz':
+ default:
+ return 'GMT' + formatTimezone(timezoneOffset, ':');
+ }
+ },
+ // Seconds timestamp
+ t: function t(date, token, _localize, options) {
+ var originalDate = options._originalDate || date;
+ var timestamp = Math.floor(originalDate.getTime() / 1000);
+ return (0, _index6.default)(timestamp, token.length);
+ },
+ // Milliseconds timestamp
+ T: function T(date, token, _localize, options) {
+ var originalDate = options._originalDate || date;
+ var timestamp = originalDate.getTime();
+ return (0, _index6.default)(timestamp, token.length);
+ }
+};
+function formatTimezoneShort(offset, dirtyDelimiter) {
+ var sign = offset > 0 ? '-' : '+';
+ var absOffset = Math.abs(offset);
+ var hours = Math.floor(absOffset / 60);
+ var minutes = absOffset % 60;
+ if (minutes === 0) {
+ return sign + String(hours);
+ }
+ var delimiter = dirtyDelimiter || '';
+ return sign + String(hours) + delimiter + (0, _index6.default)(minutes, 2);
+}
+function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
+ if (offset % 60 === 0) {
+ var sign = offset > 0 ? '-' : '+';
+ return sign + (0, _index6.default)(Math.abs(offset) / 60, 2);
+ }
+ return formatTimezone(offset, dirtyDelimiter);
+}
+function formatTimezone(offset, dirtyDelimiter) {
+ var delimiter = dirtyDelimiter || '';
+ var sign = offset > 0 ? '-' : '+';
+ var absOffset = Math.abs(offset);
+ var hours = (0, _index6.default)(Math.floor(absOffset / 60), 2);
+ var minutes = (0, _index6.default)(absOffset % 60, 2);
+ return sign + hours + delimiter + minutes;
+}
+var _default = formatters;
+exports.default = _default;
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/format/lightFormatters/index.js b/node_modules/date-fns/_lib/format/lightFormatters/index.js
new file mode 100644
index 0000000..21a2621
--- /dev/null
+++ b/node_modules/date-fns/_lib/format/lightFormatters/index.js
@@ -0,0 +1,90 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _index = _interopRequireDefault(require("../../addLeadingZeros/index.js"));
+/*
+ * | | Unit | | Unit |
+ * |-----|--------------------------------|-----|--------------------------------|
+ * | a | AM, PM | A* | |
+ * | d | Day of month | D | |
+ * | h | Hour [1-12] | H | Hour [0-23] |
+ * | m | Minute | M | Month |
+ * | s | Second | S | Fraction of second |
+ * | y | Year (abs) | Y | |
+ *
+ * Letters marked by * are not implemented but reserved by Unicode standard.
+ */
+
+var formatters = {
+ // Year
+ y: function y(date, token) {
+ // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
+ // | Year | y | yy | yyy | yyyy | yyyyy |
+ // |----------|-------|----|-------|-------|-------|
+ // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
+ // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
+ // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
+ // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
+ // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
+
+ var signedYear = date.getUTCFullYear();
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
+ return (0, _index.default)(token === 'yy' ? year % 100 : year, token.length);
+ },
+ // Month
+ M: function M(date, token) {
+ var month = date.getUTCMonth();
+ return token === 'M' ? String(month + 1) : (0, _index.default)(month + 1, 2);
+ },
+ // Day of the month
+ d: function d(date, token) {
+ return (0, _index.default)(date.getUTCDate(), token.length);
+ },
+ // AM or PM
+ a: function a(date, token) {
+ var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
+ switch (token) {
+ case 'a':
+ case 'aa':
+ return dayPeriodEnumValue.toUpperCase();
+ case 'aaa':
+ return dayPeriodEnumValue;
+ case 'aaaaa':
+ return dayPeriodEnumValue[0];
+ case 'aaaa':
+ default:
+ return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';
+ }
+ },
+ // Hour [1-12]
+ h: function h(date, token) {
+ return (0, _index.default)(date.getUTCHours() % 12 || 12, token.length);
+ },
+ // Hour [0-23]
+ H: function H(date, token) {
+ return (0, _index.default)(date.getUTCHours(), token.length);
+ },
+ // Minute
+ m: function m(date, token) {
+ return (0, _index.default)(date.getUTCMinutes(), token.length);
+ },
+ // Second
+ s: function s(date, token) {
+ return (0, _index.default)(date.getUTCSeconds(), token.length);
+ },
+ // Fraction of second
+ S: function S(date, token) {
+ var numberOfDigits = token.length;
+ var milliseconds = date.getUTCMilliseconds();
+ var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
+ return (0, _index.default)(fractionalSeconds, token.length);
+ }
+};
+var _default = formatters;
+exports.default = _default;
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/format/longFormatters/index.js b/node_modules/date-fns/_lib/format/longFormatters/index.js
new file mode 100644
index 0000000..5b65efe
--- /dev/null
+++ b/node_modules/date-fns/_lib/format/longFormatters/index.js
@@ -0,0 +1,88 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
+ switch (pattern) {
+ case 'P':
+ return formatLong.date({
+ width: 'short'
+ });
+ case 'PP':
+ return formatLong.date({
+ width: 'medium'
+ });
+ case 'PPP':
+ return formatLong.date({
+ width: 'long'
+ });
+ case 'PPPP':
+ default:
+ return formatLong.date({
+ width: 'full'
+ });
+ }
+};
+var timeLongFormatter = function timeLongFormatter(pattern, formatLong) {
+ switch (pattern) {
+ case 'p':
+ return formatLong.time({
+ width: 'short'
+ });
+ case 'pp':
+ return formatLong.time({
+ width: 'medium'
+ });
+ case 'ppp':
+ return formatLong.time({
+ width: 'long'
+ });
+ case 'pppp':
+ default:
+ return formatLong.time({
+ width: 'full'
+ });
+ }
+};
+var dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {
+ var matchResult = pattern.match(/(P+)(p+)?/) || [];
+ var datePattern = matchResult[1];
+ var timePattern = matchResult[2];
+ if (!timePattern) {
+ return dateLongFormatter(pattern, formatLong);
+ }
+ var dateTimeFormat;
+ switch (datePattern) {
+ case 'P':
+ dateTimeFormat = formatLong.dateTime({
+ width: 'short'
+ });
+ break;
+ case 'PP':
+ dateTimeFormat = formatLong.dateTime({
+ width: 'medium'
+ });
+ break;
+ case 'PPP':
+ dateTimeFormat = formatLong.dateTime({
+ width: 'long'
+ });
+ break;
+ case 'PPPP':
+ default:
+ dateTimeFormat = formatLong.dateTime({
+ width: 'full'
+ });
+ break;
+ }
+ return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));
+};
+var longFormatters = {
+ p: timeLongFormatter,
+ P: dateTimeLongFormatter
+};
+var _default = longFormatters;
+exports.default = _default;
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds/index.js b/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds/index.js
new file mode 100644
index 0000000..ca06559
--- /dev/null
+++ b/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds/index.js
@@ -0,0 +1,23 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = getTimezoneOffsetInMilliseconds;
+/**
+ * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
+ * They usually appear for dates that denote time before the timezones were introduced
+ * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
+ * and GMT+01:00:00 after that date)
+ *
+ * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
+ * which would lead to incorrect calculations.
+ *
+ * This function returns the timezone offset in milliseconds that takes seconds in account.
+ */
+function getTimezoneOffsetInMilliseconds(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.getTime() - utcDate.getTime();
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/getUTCDayOfYear/index.js b/node_modules/date-fns/_lib/getUTCDayOfYear/index.js
new file mode 100644
index 0000000..3b1af2c
--- /dev/null
+++ b/node_modules/date-fns/_lib/getUTCDayOfYear/index.js
@@ -0,0 +1,21 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = getUTCDayOfYear;
+var _index = _interopRequireDefault(require("../../toDate/index.js"));
+var _index2 = _interopRequireDefault(require("../requiredArgs/index.js"));
+var MILLISECONDS_IN_DAY = 86400000;
+function getUTCDayOfYear(dirtyDate) {
+ (0, _index2.default)(1, arguments);
+ var date = (0, _index.default)(dirtyDate);
+ var timestamp = date.getTime();
+ date.setUTCMonth(0, 1);
+ date.setUTCHours(0, 0, 0, 0);
+ var startOfYearTimestamp = date.getTime();
+ var difference = timestamp - startOfYearTimestamp;
+ return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/getUTCISOWeek/index.js b/node_modules/date-fns/_lib/getUTCISOWeek/index.js
new file mode 100644
index 0000000..a21a412
--- /dev/null
+++ b/node_modules/date-fns/_lib/getUTCISOWeek/index.js
@@ -0,0 +1,23 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = getUTCISOWeek;
+var _index = _interopRequireDefault(require("../../toDate/index.js"));
+var _index2 = _interopRequireDefault(require("../startOfUTCISOWeek/index.js"));
+var _index3 = _interopRequireDefault(require("../startOfUTCISOWeekYear/index.js"));
+var _index4 = _interopRequireDefault(require("../requiredArgs/index.js"));
+var MILLISECONDS_IN_WEEK = 604800000;
+function getUTCISOWeek(dirtyDate) {
+ (0, _index4.default)(1, arguments);
+ var date = (0, _index.default)(dirtyDate);
+ var diff = (0, _index2.default)(date).getTime() - (0, _index3.default)(date).getTime();
+
+ // Round the number of days to the nearest integer
+ // because the number of milliseconds in a week is not constant
+ // (e.g. it's different in the week of the daylight saving time clock shift)
+ return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/getUTCISOWeekYear/index.js b/node_modules/date-fns/_lib/getUTCISOWeekYear/index.js
new file mode 100644
index 0000000..fb65e3c
--- /dev/null
+++ b/node_modules/date-fns/_lib/getUTCISOWeekYear/index.js
@@ -0,0 +1,31 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = getUTCISOWeekYear;
+var _index = _interopRequireDefault(require("../../toDate/index.js"));
+var _index2 = _interopRequireDefault(require("../requiredArgs/index.js"));
+var _index3 = _interopRequireDefault(require("../startOfUTCISOWeek/index.js"));
+function getUTCISOWeekYear(dirtyDate) {
+ (0, _index2.default)(1, arguments);
+ var date = (0, _index.default)(dirtyDate);
+ var year = date.getUTCFullYear();
+ var fourthOfJanuaryOfNextYear = new Date(0);
+ fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
+ fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
+ var startOfNextYear = (0, _index3.default)(fourthOfJanuaryOfNextYear);
+ var fourthOfJanuaryOfThisYear = new Date(0);
+ fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
+ fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
+ var startOfThisYear = (0, _index3.default)(fourthOfJanuaryOfThisYear);
+ if (date.getTime() >= startOfNextYear.getTime()) {
+ return year + 1;
+ } else if (date.getTime() >= startOfThisYear.getTime()) {
+ return year;
+ } else {
+ return year - 1;
+ }
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/getUTCWeek/index.js b/node_modules/date-fns/_lib/getUTCWeek/index.js
new file mode 100644
index 0000000..63dbdc3
--- /dev/null
+++ b/node_modules/date-fns/_lib/getUTCWeek/index.js
@@ -0,0 +1,23 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = getUTCWeek;
+var _index = _interopRequireDefault(require("../../toDate/index.js"));
+var _index2 = _interopRequireDefault(require("../startOfUTCWeek/index.js"));
+var _index3 = _interopRequireDefault(require("../startOfUTCWeekYear/index.js"));
+var _index4 = _interopRequireDefault(require("../requiredArgs/index.js"));
+var MILLISECONDS_IN_WEEK = 604800000;
+function getUTCWeek(dirtyDate, options) {
+ (0, _index4.default)(1, arguments);
+ var date = (0, _index.default)(dirtyDate);
+ var diff = (0, _index2.default)(date, options).getTime() - (0, _index3.default)(date, options).getTime();
+
+ // Round the number of days to the nearest integer
+ // because the number of milliseconds in a week is not constant
+ // (e.g. it's different in the week of the daylight saving time clock shift)
+ return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/getUTCWeekYear/index.js b/node_modules/date-fns/_lib/getUTCWeekYear/index.js
new file mode 100644
index 0000000..b0707eb
--- /dev/null
+++ b/node_modules/date-fns/_lib/getUTCWeekYear/index.js
@@ -0,0 +1,41 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = getUTCWeekYear;
+var _index = _interopRequireDefault(require("../../toDate/index.js"));
+var _index2 = _interopRequireDefault(require("../requiredArgs/index.js"));
+var _index3 = _interopRequireDefault(require("../startOfUTCWeek/index.js"));
+var _index4 = _interopRequireDefault(require("../toInteger/index.js"));
+var _index5 = require("../defaultOptions/index.js");
+function getUTCWeekYear(dirtyDate, options) {
+ var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
+ (0, _index2.default)(1, arguments);
+ var date = (0, _index.default)(dirtyDate);
+ var year = date.getUTCFullYear();
+ var defaultOptions = (0, _index5.getDefaultOptions)();
+ var firstWeekContainsDate = (0, _index4.default)((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
+
+ // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
+ if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
+ throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
+ }
+ var firstWeekOfNextYear = new Date(0);
+ firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
+ firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
+ var startOfNextYear = (0, _index3.default)(firstWeekOfNextYear, options);
+ var firstWeekOfThisYear = new Date(0);
+ firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
+ firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
+ var startOfThisYear = (0, _index3.default)(firstWeekOfThisYear, options);
+ if (date.getTime() >= startOfNextYear.getTime()) {
+ return year + 1;
+ } else if (date.getTime() >= startOfThisYear.getTime()) {
+ return year;
+ } else {
+ return year - 1;
+ }
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/isSameUTCWeek/index.js b/node_modules/date-fns/_lib/isSameUTCWeek/index.js
new file mode 100644
index 0000000..dda29ed
--- /dev/null
+++ b/node_modules/date-fns/_lib/isSameUTCWeek/index.js
@@ -0,0 +1,16 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isSameUTCWeek;
+var _index = _interopRequireDefault(require("../requiredArgs/index.js"));
+var _index2 = _interopRequireDefault(require("../startOfUTCWeek/index.js"));
+function isSameUTCWeek(dirtyDateLeft, dirtyDateRight, options) {
+ (0, _index.default)(2, arguments);
+ var dateLeftStartOfWeek = (0, _index2.default)(dirtyDateLeft, options);
+ var dateRightStartOfWeek = (0, _index2.default)(dirtyDateRight, options);
+ return dateLeftStartOfWeek.getTime() === dateRightStartOfWeek.getTime();
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/protectedTokens/index.js b/node_modules/date-fns/_lib/protectedTokens/index.js
new file mode 100644
index 0000000..29186b1
--- /dev/null
+++ b/node_modules/date-fns/_lib/protectedTokens/index.js
@@ -0,0 +1,27 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.isProtectedDayOfYearToken = isProtectedDayOfYearToken;
+exports.isProtectedWeekYearToken = isProtectedWeekYearToken;
+exports.throwProtectedError = throwProtectedError;
+var protectedDayOfYearTokens = ['D', 'DD'];
+var protectedWeekYearTokens = ['YY', 'YYYY'];
+function isProtectedDayOfYearToken(token) {
+ return protectedDayOfYearTokens.indexOf(token) !== -1;
+}
+function isProtectedWeekYearToken(token) {
+ return protectedWeekYearTokens.indexOf(token) !== -1;
+}
+function throwProtectedError(token, format, input) {
+ if (token === 'YYYY') {
+ throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
+ } else if (token === 'YY') {
+ throw new RangeError("Use `yy` instead of `YY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
+ } else if (token === 'D') {
+ throw new RangeError("Use `d` instead of `D` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
+ } else if (token === 'DD') {
+ throw new RangeError("Use `dd` instead of `DD` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
+ }
+} \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/requiredArgs/index.js b/node_modules/date-fns/_lib/requiredArgs/index.js
new file mode 100644
index 0000000..49f0b17
--- /dev/null
+++ b/node_modules/date-fns/_lib/requiredArgs/index.js
@@ -0,0 +1,12 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = requiredArgs;
+function requiredArgs(required, args) {
+ if (args.length < required) {
+ throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
+ }
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/roundingMethods/index.js b/node_modules/date-fns/_lib/roundingMethods/index.js
new file mode 100644
index 0000000..53863a5
--- /dev/null
+++ b/node_modules/date-fns/_lib/roundingMethods/index.js
@@ -0,0 +1,19 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.getRoundingMethod = getRoundingMethod;
+var roundingMap = {
+ ceil: Math.ceil,
+ round: Math.round,
+ floor: Math.floor,
+ trunc: function trunc(value) {
+ return value < 0 ? Math.ceil(value) : Math.floor(value);
+ } // Math.trunc is not supported by IE
+};
+
+var defaultRoundingMethod = 'trunc';
+function getRoundingMethod(method) {
+ return method ? roundingMap[method] : roundingMap[defaultRoundingMethod];
+} \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/setUTCDay/index.js b/node_modules/date-fns/_lib/setUTCDay/index.js
new file mode 100644
index 0000000..43714fe
--- /dev/null
+++ b/node_modules/date-fns/_lib/setUTCDay/index.js
@@ -0,0 +1,31 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = setUTCDay;
+var _index = _interopRequireDefault(require("../../toDate/index.js"));
+var _index2 = _interopRequireDefault(require("../requiredArgs/index.js"));
+var _index3 = _interopRequireDefault(require("../toInteger/index.js"));
+var _index4 = require("../defaultOptions/index.js");
+function setUTCDay(dirtyDate, dirtyDay, options) {
+ var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
+ (0, _index2.default)(2, arguments);
+ var defaultOptions = (0, _index4.getDefaultOptions)();
+ var weekStartsOn = (0, _index3.default)((_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 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
+
+ // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
+ if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
+ throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
+ }
+ var date = (0, _index.default)(dirtyDate);
+ var day = (0, _index3.default)(dirtyDay);
+ var currentDay = date.getUTCDay();
+ var remainder = day % 7;
+ var dayIndex = (remainder + 7) % 7;
+ var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;
+ date.setUTCDate(date.getUTCDate() + diff);
+ return date;
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/setUTCISODay/index.js b/node_modules/date-fns/_lib/setUTCISODay/index.js
new file mode 100644
index 0000000..55c0f4e
--- /dev/null
+++ b/node_modules/date-fns/_lib/setUTCISODay/index.js
@@ -0,0 +1,26 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = setUTCISODay;
+var _index = _interopRequireDefault(require("../../toDate/index.js"));
+var _index2 = _interopRequireDefault(require("../requiredArgs/index.js"));
+var _index3 = _interopRequireDefault(require("../toInteger/index.js"));
+function setUTCISODay(dirtyDate, dirtyDay) {
+ (0, _index2.default)(2, arguments);
+ var day = (0, _index3.default)(dirtyDay);
+ if (day % 7 === 0) {
+ day = day - 7;
+ }
+ var weekStartsOn = 1;
+ var date = (0, _index.default)(dirtyDate);
+ var currentDay = date.getUTCDay();
+ var remainder = day % 7;
+ var dayIndex = (remainder + 7) % 7;
+ var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;
+ date.setUTCDate(date.getUTCDate() + diff);
+ return date;
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/setUTCISOWeek/index.js b/node_modules/date-fns/_lib/setUTCISOWeek/index.js
new file mode 100644
index 0000000..8b73641
--- /dev/null
+++ b/node_modules/date-fns/_lib/setUTCISOWeek/index.js
@@ -0,0 +1,20 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = setUTCISOWeek;
+var _index = _interopRequireDefault(require("../toInteger/index.js"));
+var _index2 = _interopRequireDefault(require("../../toDate/index.js"));
+var _index3 = _interopRequireDefault(require("../getUTCISOWeek/index.js"));
+var _index4 = _interopRequireDefault(require("../requiredArgs/index.js"));
+function setUTCISOWeek(dirtyDate, dirtyISOWeek) {
+ (0, _index4.default)(2, arguments);
+ var date = (0, _index2.default)(dirtyDate);
+ var isoWeek = (0, _index.default)(dirtyISOWeek);
+ var diff = (0, _index3.default)(date) - isoWeek;
+ date.setUTCDate(date.getUTCDate() - diff * 7);
+ return date;
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/setUTCWeek/index.js b/node_modules/date-fns/_lib/setUTCWeek/index.js
new file mode 100644
index 0000000..dc98d49
--- /dev/null
+++ b/node_modules/date-fns/_lib/setUTCWeek/index.js
@@ -0,0 +1,20 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = setUTCWeek;
+var _index = _interopRequireDefault(require("../toInteger/index.js"));
+var _index2 = _interopRequireDefault(require("../../toDate/index.js"));
+var _index3 = _interopRequireDefault(require("../getUTCWeek/index.js"));
+var _index4 = _interopRequireDefault(require("../requiredArgs/index.js"));
+function setUTCWeek(dirtyDate, dirtyWeek, options) {
+ (0, _index4.default)(2, arguments);
+ var date = (0, _index2.default)(dirtyDate);
+ var week = (0, _index.default)(dirtyWeek);
+ var diff = (0, _index3.default)(date, options) - week;
+ date.setUTCDate(date.getUTCDate() - diff * 7);
+ return date;
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/startOfUTCISOWeek/index.js b/node_modules/date-fns/_lib/startOfUTCISOWeek/index.js
new file mode 100644
index 0000000..5bdf242
--- /dev/null
+++ b/node_modules/date-fns/_lib/startOfUTCISOWeek/index.js
@@ -0,0 +1,20 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = startOfUTCISOWeek;
+var _index = _interopRequireDefault(require("../../toDate/index.js"));
+var _index2 = _interopRequireDefault(require("../requiredArgs/index.js"));
+function startOfUTCISOWeek(dirtyDate) {
+ (0, _index2.default)(1, arguments);
+ var weekStartsOn = 1;
+ var date = (0, _index.default)(dirtyDate);
+ var day = date.getUTCDay();
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
+ date.setUTCDate(date.getUTCDate() - diff);
+ date.setUTCHours(0, 0, 0, 0);
+ return date;
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/startOfUTCISOWeekYear/index.js b/node_modules/date-fns/_lib/startOfUTCISOWeekYear/index.js
new file mode 100644
index 0000000..e836651
--- /dev/null
+++ b/node_modules/date-fns/_lib/startOfUTCISOWeekYear/index.js
@@ -0,0 +1,20 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = startOfUTCISOWeekYear;
+var _index = _interopRequireDefault(require("../getUTCISOWeekYear/index.js"));
+var _index2 = _interopRequireDefault(require("../startOfUTCISOWeek/index.js"));
+var _index3 = _interopRequireDefault(require("../requiredArgs/index.js"));
+function startOfUTCISOWeekYear(dirtyDate) {
+ (0, _index3.default)(1, arguments);
+ var year = (0, _index.default)(dirtyDate);
+ var fourthOfJanuary = new Date(0);
+ fourthOfJanuary.setUTCFullYear(year, 0, 4);
+ fourthOfJanuary.setUTCHours(0, 0, 0, 0);
+ var date = (0, _index2.default)(fourthOfJanuary);
+ return date;
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/startOfUTCWeek/index.js b/node_modules/date-fns/_lib/startOfUTCWeek/index.js
new file mode 100644
index 0000000..c317437
--- /dev/null
+++ b/node_modules/date-fns/_lib/startOfUTCWeek/index.js
@@ -0,0 +1,29 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = startOfUTCWeek;
+var _index = _interopRequireDefault(require("../../toDate/index.js"));
+var _index2 = _interopRequireDefault(require("../requiredArgs/index.js"));
+var _index3 = _interopRequireDefault(require("../toInteger/index.js"));
+var _index4 = require("../defaultOptions/index.js");
+function startOfUTCWeek(dirtyDate, options) {
+ var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
+ (0, _index2.default)(1, arguments);
+ var defaultOptions = (0, _index4.getDefaultOptions)();
+ var weekStartsOn = (0, _index3.default)((_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 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
+
+ // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
+ if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
+ throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
+ }
+ var date = (0, _index.default)(dirtyDate);
+ var day = date.getUTCDay();
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
+ date.setUTCDate(date.getUTCDate() - diff);
+ date.setUTCHours(0, 0, 0, 0);
+ return date;
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/startOfUTCWeekYear/index.js b/node_modules/date-fns/_lib/startOfUTCWeekYear/index.js
new file mode 100644
index 0000000..9e23785
--- /dev/null
+++ b/node_modules/date-fns/_lib/startOfUTCWeekYear/index.js
@@ -0,0 +1,25 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = startOfUTCWeekYear;
+var _index = _interopRequireDefault(require("../getUTCWeekYear/index.js"));
+var _index2 = _interopRequireDefault(require("../requiredArgs/index.js"));
+var _index3 = _interopRequireDefault(require("../startOfUTCWeek/index.js"));
+var _index4 = _interopRequireDefault(require("../toInteger/index.js"));
+var _index5 = require("../defaultOptions/index.js");
+function startOfUTCWeekYear(dirtyDate, options) {
+ var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
+ (0, _index2.default)(1, arguments);
+ var defaultOptions = (0, _index5.getDefaultOptions)();
+ var firstWeekContainsDate = (0, _index4.default)((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
+ var year = (0, _index.default)(dirtyDate, options);
+ var firstWeek = new Date(0);
+ firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
+ firstWeek.setUTCHours(0, 0, 0, 0);
+ var date = (0, _index3.default)(firstWeek, options);
+ return date;
+}
+module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/test/index.js b/node_modules/date-fns/_lib/test/index.js
new file mode 100644
index 0000000..78c3dee
--- /dev/null
+++ b/node_modules/date-fns/_lib/test/index.js
@@ -0,0 +1,33 @@
+"use strict";
+
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.assertType = assertType;
+exports.generateOffset = generateOffset;
+exports.resetDefaultOptions = resetDefaultOptions;
+var _index = _interopRequireDefault(require("../addLeadingZeros/index.js"));
+var _index2 = require("../defaultOptions/index.js");
+function assertType(_) {}
+function resetDefaultOptions() {
+ (0, _index2.setDefaultOptions)({});
+}
+
+// This makes sure we create the consistent offsets across timezones, no matter where these tests are ran.
+function generateOffset(originalDate) {
+ // Add the timezone.
+ var offset = '';
+ var tzOffset = originalDate.getTimezoneOffset();
+ if (tzOffset !== 0) {
+ var absoluteOffset = Math.abs(tzOffset);
+ var hourOffset = (0, _index.default)(Math.floor(absoluteOffset / 60), 2);
+ var minuteOffset = (0, _index.default)(absoluteOffset % 60, 2);
+ // If less than 0, the sign is +, because it is ahead of time.
+ var sign = tzOffset < 0 ? '+' : '-';
+ offset = "".concat(sign).concat(hourOffset, ":").concat(minuteOffset);
+ } else {
+ offset = 'Z';
+ }
+ return offset;
+} \ No newline at end of file
diff --git a/node_modules/date-fns/_lib/toInteger/index.js b/node_modules/date-fns/_lib/toInteger/index.js
new file mode 100644
index 0000000..5a6198d
--- /dev/null
+++ b/node_modules/date-fns/_lib/toInteger/index.js
@@ -0,0 +1,17 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = toInteger;
+function toInteger(dirtyNumber) {
+ if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
+ return NaN;
+ }
+ var number = Number(dirtyNumber);
+ if (isNaN(number)) {
+ return number;
+ }
+ return number < 0 ? Math.ceil(number) : Math.floor(number);
+}
+module.exports = exports.default; \ No newline at end of file
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage