@nulogy/components 8.8.0 → 8.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +396 -282
- package/dist/main.module.js +396 -282
- package/package.json +3 -4
package/dist/main.js
CHANGED
|
@@ -27768,7 +27768,7 @@
|
|
|
27768
27768
|
|
|
27769
27769
|
function requiredArgs$1(required, args) {
|
|
27770
27770
|
if (args.length < required) {
|
|
27771
|
-
throw new TypeError(required + ' argument' + required > 1 ? 's' : '' + ' required, but only ' + args.length + ' present');
|
|
27771
|
+
throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
|
|
27772
27772
|
}
|
|
27773
27773
|
}
|
|
27774
27774
|
|
|
@@ -27815,7 +27815,7 @@
|
|
|
27815
27815
|
} else {
|
|
27816
27816
|
if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
|
|
27817
27817
|
// eslint-disable-next-line no-console
|
|
27818
|
-
console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"); // eslint-disable-next-line no-console
|
|
27818
|
+
console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"); // eslint-disable-next-line no-console
|
|
27819
27819
|
|
|
27820
27820
|
console.warn(new Error().stack);
|
|
27821
27821
|
}
|
|
@@ -27837,13 +27837,13 @@
|
|
|
27837
27837
|
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
27838
27838
|
*
|
|
27839
27839
|
* @param {Date|Number} date - the date to be changed
|
|
27840
|
-
* @param {Number} amount - the amount of days to be added
|
|
27841
|
-
* @returns {Date} the new date with the days added
|
|
27842
|
-
* @throws {TypeError} 2 arguments required
|
|
27840
|
+
* @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
|
|
27841
|
+
* @returns {Date} - the new date with the days added
|
|
27842
|
+
* @throws {TypeError} - 2 arguments required
|
|
27843
27843
|
*
|
|
27844
27844
|
* @example
|
|
27845
27845
|
* // Add 10 days to 1 September 2014:
|
|
27846
|
-
*
|
|
27846
|
+
* const result = addDays(new Date(2014, 8, 1), 10)
|
|
27847
27847
|
* //=> Thu Sep 11 2014 00:00:00
|
|
27848
27848
|
*/
|
|
27849
27849
|
|
|
@@ -27851,6 +27851,16 @@
|
|
|
27851
27851
|
requiredArgs$1(2, arguments);
|
|
27852
27852
|
var date = toDate$1(dirtyDate);
|
|
27853
27853
|
var amount = toInteger$1(dirtyAmount);
|
|
27854
|
+
|
|
27855
|
+
if (isNaN(amount)) {
|
|
27856
|
+
return new Date(NaN);
|
|
27857
|
+
}
|
|
27858
|
+
|
|
27859
|
+
if (!amount) {
|
|
27860
|
+
// If 0 days, no-op to avoid changing times in the hour before end of DST
|
|
27861
|
+
return date;
|
|
27862
|
+
}
|
|
27863
|
+
|
|
27854
27864
|
date.setDate(date.getDate() + amount);
|
|
27855
27865
|
return date;
|
|
27856
27866
|
}
|
|
@@ -27868,13 +27878,13 @@
|
|
|
27868
27878
|
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
27869
27879
|
*
|
|
27870
27880
|
* @param {Date|Number} date - the date to be changed
|
|
27871
|
-
* @param {Number} amount - the amount of milliseconds to be added
|
|
27881
|
+
* @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
|
|
27872
27882
|
* @returns {Date} the new date with the milliseconds added
|
|
27873
27883
|
* @throws {TypeError} 2 arguments required
|
|
27874
27884
|
*
|
|
27875
27885
|
* @example
|
|
27876
27886
|
* // Add 750 milliseconds to 10 July 2014 12:45:30.000:
|
|
27877
|
-
*
|
|
27887
|
+
* const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
|
27878
27888
|
* //=> Thu Jul 10 2014 12:45:30.750
|
|
27879
27889
|
*/
|
|
27880
27890
|
|
|
@@ -27885,7 +27895,6 @@
|
|
|
27885
27895
|
return new Date(timestamp + amount);
|
|
27886
27896
|
}
|
|
27887
27897
|
|
|
27888
|
-
var MILLISECONDS_IN_MINUTE$3 = 60000;
|
|
27889
27898
|
/**
|
|
27890
27899
|
* Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
|
|
27891
27900
|
* They usually appear for dates that denote time before the timezones were introduced
|
|
@@ -27897,13 +27906,10 @@
|
|
|
27897
27906
|
*
|
|
27898
27907
|
* This function returns the timezone offset in milliseconds that takes seconds in account.
|
|
27899
27908
|
*/
|
|
27900
|
-
|
|
27901
|
-
|
|
27902
|
-
|
|
27903
|
-
|
|
27904
|
-
date.setSeconds(0, 0);
|
|
27905
|
-
var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE$3;
|
|
27906
|
-
return baseTimezoneOffset * MILLISECONDS_IN_MINUTE$3 + millisecondsPartOfTimezoneOffset;
|
|
27909
|
+
function getTimezoneOffsetInMilliseconds$1(date) {
|
|
27910
|
+
var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
27911
|
+
utcDate.setUTCFullYear(date.getFullYear());
|
|
27912
|
+
return date.getTime() - utcDate.getTime();
|
|
27907
27913
|
}
|
|
27908
27914
|
|
|
27909
27915
|
/**
|
|
@@ -27925,7 +27931,7 @@
|
|
|
27925
27931
|
*
|
|
27926
27932
|
* @example
|
|
27927
27933
|
* // The start of a day for 2 September 2014 11:55:00:
|
|
27928
|
-
*
|
|
27934
|
+
* const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
|
|
27929
27935
|
* //=> Tue Sep 02 2014 00:00:00
|
|
27930
27936
|
*/
|
|
27931
27937
|
|
|
@@ -27958,14 +27964,14 @@
|
|
|
27958
27964
|
* @example
|
|
27959
27965
|
* // How many calendar days are between
|
|
27960
27966
|
* // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
|
|
27961
|
-
*
|
|
27967
|
+
* const result = differenceInCalendarDays(
|
|
27962
27968
|
* new Date(2012, 6, 2, 0, 0),
|
|
27963
27969
|
* new Date(2011, 6, 2, 23, 0)
|
|
27964
27970
|
* )
|
|
27965
27971
|
* //=> 366
|
|
27966
27972
|
* // How many calendar days are between
|
|
27967
27973
|
* // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
|
|
27968
|
-
*
|
|
27974
|
+
* const result = differenceInCalendarDays(
|
|
27969
27975
|
* new Date(2011, 6, 3, 0, 1),
|
|
27970
27976
|
* new Date(2011, 6, 2, 23, 59)
|
|
27971
27977
|
* )
|
|
@@ -27984,58 +27990,6 @@
|
|
|
27984
27990
|
return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY$3);
|
|
27985
27991
|
}
|
|
27986
27992
|
|
|
27987
|
-
/**
|
|
27988
|
-
* @name compareAsc
|
|
27989
|
-
* @category Common Helpers
|
|
27990
|
-
* @summary Compare the two dates and return -1, 0 or 1.
|
|
27991
|
-
*
|
|
27992
|
-
* @description
|
|
27993
|
-
* Compare the two dates and return 1 if the first date is after the second,
|
|
27994
|
-
* -1 if the first date is before the second or 0 if dates are equal.
|
|
27995
|
-
*
|
|
27996
|
-
* ### v2.0.0 breaking changes:
|
|
27997
|
-
*
|
|
27998
|
-
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
27999
|
-
*
|
|
28000
|
-
* @param {Date|Number} dateLeft - the first date to compare
|
|
28001
|
-
* @param {Date|Number} dateRight - the second date to compare
|
|
28002
|
-
* @returns {Number} the result of the comparison
|
|
28003
|
-
* @throws {TypeError} 2 arguments required
|
|
28004
|
-
*
|
|
28005
|
-
* @example
|
|
28006
|
-
* // Compare 11 February 1987 and 10 July 1989:
|
|
28007
|
-
* var result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))
|
|
28008
|
-
* //=> -1
|
|
28009
|
-
*
|
|
28010
|
-
* @example
|
|
28011
|
-
* // Sort the array of dates:
|
|
28012
|
-
* var result = [
|
|
28013
|
-
* new Date(1995, 6, 2),
|
|
28014
|
-
* new Date(1987, 1, 11),
|
|
28015
|
-
* new Date(1989, 6, 10)
|
|
28016
|
-
* ].sort(compareAsc)
|
|
28017
|
-
* //=> [
|
|
28018
|
-
* // Wed Feb 11 1987 00:00:00,
|
|
28019
|
-
* // Mon Jul 10 1989 00:00:00,
|
|
28020
|
-
* // Sun Jul 02 1995 00:00:00
|
|
28021
|
-
* // ]
|
|
28022
|
-
*/
|
|
28023
|
-
|
|
28024
|
-
function compareAsc(dirtyDateLeft, dirtyDateRight) {
|
|
28025
|
-
requiredArgs$1(2, arguments);
|
|
28026
|
-
var dateLeft = toDate$1(dirtyDateLeft);
|
|
28027
|
-
var dateRight = toDate$1(dirtyDateRight);
|
|
28028
|
-
var diff = dateLeft.getTime() - dateRight.getTime();
|
|
28029
|
-
|
|
28030
|
-
if (diff < 0) {
|
|
28031
|
-
return -1;
|
|
28032
|
-
} else if (diff > 0) {
|
|
28033
|
-
return 1; // Return 0 if diff is 0; return NaN if diff is NaN
|
|
28034
|
-
} else {
|
|
28035
|
-
return diff;
|
|
28036
|
-
}
|
|
28037
|
-
}
|
|
28038
|
-
|
|
28039
27993
|
/**
|
|
28040
27994
|
* @name isValid
|
|
28041
27995
|
* @category Common Helpers
|
|
@@ -28130,13 +28084,37 @@
|
|
|
28130
28084
|
return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();
|
|
28131
28085
|
}
|
|
28132
28086
|
|
|
28087
|
+
// for accurate equality comparisons of UTC timestamps that end up
|
|
28088
|
+
// having the same representation in local time, e.g. one hour before
|
|
28089
|
+
// DST ends vs. the instant that DST ends.
|
|
28090
|
+
|
|
28091
|
+
function compareLocalAsc(dateLeft, dateRight) {
|
|
28092
|
+
var diff = dateLeft.getFullYear() - dateRight.getFullYear() || dateLeft.getMonth() - dateRight.getMonth() || dateLeft.getDate() - dateRight.getDate() || dateLeft.getHours() - dateRight.getHours() || dateLeft.getMinutes() - dateRight.getMinutes() || dateLeft.getSeconds() - dateRight.getSeconds() || dateLeft.getMilliseconds() - dateRight.getMilliseconds();
|
|
28093
|
+
|
|
28094
|
+
if (diff < 0) {
|
|
28095
|
+
return -1;
|
|
28096
|
+
} else if (diff > 0) {
|
|
28097
|
+
return 1; // Return 0 if diff is 0; return NaN if diff is NaN
|
|
28098
|
+
} else {
|
|
28099
|
+
return diff;
|
|
28100
|
+
}
|
|
28101
|
+
}
|
|
28133
28102
|
/**
|
|
28134
28103
|
* @name differenceInDays
|
|
28135
28104
|
* @category Day Helpers
|
|
28136
28105
|
* @summary Get the number of full days between the given dates.
|
|
28137
28106
|
*
|
|
28138
28107
|
* @description
|
|
28139
|
-
* Get the number of full day periods between
|
|
28108
|
+
* Get the number of full day periods between two dates. Fractional days are
|
|
28109
|
+
* truncated towards zero.
|
|
28110
|
+
*
|
|
28111
|
+
* One "full day" is the distance between a local time in one day to the same
|
|
28112
|
+
* local time on the next or previous day. A full day can sometimes be less than
|
|
28113
|
+
* or more than 24 hours if a daylight savings change happens between two dates.
|
|
28114
|
+
*
|
|
28115
|
+
* To ignore DST and only measure exact 24-hour periods, use this instead:
|
|
28116
|
+
* `Math.floor(differenceInHours(dateLeft, dateRight)/24)|0`.
|
|
28117
|
+
*
|
|
28140
28118
|
*
|
|
28141
28119
|
* ### v2.0.0 breaking changes:
|
|
28142
28120
|
*
|
|
@@ -28144,36 +28122,48 @@
|
|
|
28144
28122
|
*
|
|
28145
28123
|
* @param {Date|Number} dateLeft - the later date
|
|
28146
28124
|
* @param {Date|Number} dateRight - the earlier date
|
|
28147
|
-
* @returns {Number} the number of full days
|
|
28125
|
+
* @returns {Number} the number of full days according to the local timezone
|
|
28148
28126
|
* @throws {TypeError} 2 arguments required
|
|
28149
28127
|
*
|
|
28150
28128
|
* @example
|
|
28151
28129
|
* // How many full days are between
|
|
28152
28130
|
* // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
|
|
28153
|
-
*
|
|
28131
|
+
* const result = differenceInDays(
|
|
28154
28132
|
* new Date(2012, 6, 2, 0, 0),
|
|
28155
28133
|
* new Date(2011, 6, 2, 23, 0)
|
|
28156
28134
|
* )
|
|
28157
28135
|
* //=> 365
|
|
28158
|
-
* // How many days are between
|
|
28136
|
+
* // How many full days are between
|
|
28159
28137
|
* // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
|
|
28160
|
-
*
|
|
28138
|
+
* const result = differenceInDays(
|
|
28161
28139
|
* new Date(2011, 6, 3, 0, 1),
|
|
28162
28140
|
* new Date(2011, 6, 2, 23, 59)
|
|
28163
28141
|
* )
|
|
28164
28142
|
* //=> 0
|
|
28143
|
+
* // How many full days are between
|
|
28144
|
+
* // 1 March 2020 0:00 and 1 June 2020 0:00 ?
|
|
28145
|
+
* // Note: because local time is used, the
|
|
28146
|
+
* // result will always be 92 days, even in
|
|
28147
|
+
* // time zones where DST starts and the
|
|
28148
|
+
* // period has only 92*24-1 hours.
|
|
28149
|
+
* const result = differenceInDays(
|
|
28150
|
+
* new Date(2020, 5, 1),
|
|
28151
|
+
* new Date(2020, 2, 1)
|
|
28152
|
+
* )
|
|
28153
|
+
//=> 92
|
|
28165
28154
|
*/
|
|
28166
28155
|
|
|
28156
|
+
|
|
28167
28157
|
function differenceInDays(dirtyDateLeft, dirtyDateRight) {
|
|
28168
28158
|
requiredArgs$1(2, arguments);
|
|
28169
28159
|
var dateLeft = toDate$1(dirtyDateLeft);
|
|
28170
28160
|
var dateRight = toDate$1(dirtyDateRight);
|
|
28171
|
-
var sign =
|
|
28161
|
+
var sign = compareLocalAsc(dateLeft, dateRight);
|
|
28172
28162
|
var difference = Math.abs(differenceInCalendarDays$1(dateLeft, dateRight));
|
|
28173
28163
|
dateLeft.setDate(dateLeft.getDate() - sign * difference); // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full
|
|
28174
28164
|
// If so, result must be decreased by 1 in absolute value
|
|
28175
28165
|
|
|
28176
|
-
var isLastDayNotFull =
|
|
28166
|
+
var isLastDayNotFull = Number(compareLocalAsc(dateLeft, dateRight) === -sign);
|
|
28177
28167
|
var result = sign * (difference - isLastDayNotFull); // Prevent negative zero
|
|
28178
28168
|
|
|
28179
28169
|
return result === 0 ? 0 : result;
|
|
@@ -28209,6 +28199,14 @@
|
|
|
28209
28199
|
one: '1 day',
|
|
28210
28200
|
other: '{{count}} days'
|
|
28211
28201
|
},
|
|
28202
|
+
aboutXWeeks: {
|
|
28203
|
+
one: 'about 1 week',
|
|
28204
|
+
other: 'about {{count}} weeks'
|
|
28205
|
+
},
|
|
28206
|
+
xWeeks: {
|
|
28207
|
+
one: '1 week',
|
|
28208
|
+
other: '{{count}} weeks'
|
|
28209
|
+
},
|
|
28212
28210
|
aboutXMonths: {
|
|
28213
28211
|
one: 'about 1 month',
|
|
28214
28212
|
other: 'about {{count}} months'
|
|
@@ -28258,8 +28256,9 @@
|
|
|
28258
28256
|
}
|
|
28259
28257
|
|
|
28260
28258
|
function buildFormatLongFn$1(args) {
|
|
28261
|
-
return function (
|
|
28262
|
-
var options =
|
|
28259
|
+
return function () {
|
|
28260
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
28261
|
+
// TODO: Remove String()
|
|
28263
28262
|
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
28264
28263
|
var format = args.formats[width] || args.formats[args.defaultWidth];
|
|
28265
28264
|
return format;
|
|
@@ -28329,7 +28328,8 @@
|
|
|
28329
28328
|
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
28330
28329
|
}
|
|
28331
28330
|
|
|
28332
|
-
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
|
|
28331
|
+
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challange you to try to remove it!
|
|
28332
|
+
|
|
28333
28333
|
return valuesArray[index];
|
|
28334
28334
|
};
|
|
28335
28335
|
}
|
|
@@ -28342,12 +28342,12 @@
|
|
|
28342
28342
|
var quarterValues$9 = {
|
|
28343
28343
|
narrow: ['1', '2', '3', '4'],
|
|
28344
28344
|
abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
|
|
28345
|
-
wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
|
|
28346
|
-
|
|
28347
|
-
|
|
28348
|
-
|
|
28345
|
+
wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
|
|
28346
|
+
}; // Note: in English, the names of days of the week and months are capitalized.
|
|
28347
|
+
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
|
|
28348
|
+
// Generally, formatted dates should look like they are in the middle of a sentence,
|
|
28349
|
+
// e.g. in Spanish language the weekdays and months should be in the lowercase.
|
|
28349
28350
|
|
|
28350
|
-
};
|
|
28351
28351
|
var monthValues$9 = {
|
|
28352
28352
|
narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
|
|
28353
28353
|
abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
@@ -28483,35 +28483,26 @@
|
|
|
28483
28483
|
};
|
|
28484
28484
|
|
|
28485
28485
|
function buildMatchPatternFn$1(args) {
|
|
28486
|
-
return function (
|
|
28487
|
-
var
|
|
28488
|
-
var options = dirtyOptions || {};
|
|
28486
|
+
return function (string) {
|
|
28487
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
28489
28488
|
var matchResult = string.match(args.matchPattern);
|
|
28490
|
-
|
|
28491
|
-
if (!matchResult) {
|
|
28492
|
-
return null;
|
|
28493
|
-
}
|
|
28494
|
-
|
|
28489
|
+
if (!matchResult) return null;
|
|
28495
28490
|
var matchedString = matchResult[0];
|
|
28496
28491
|
var parseResult = string.match(args.parsePattern);
|
|
28497
|
-
|
|
28498
|
-
if (!parseResult) {
|
|
28499
|
-
return null;
|
|
28500
|
-
}
|
|
28501
|
-
|
|
28492
|
+
if (!parseResult) return null;
|
|
28502
28493
|
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
28503
28494
|
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
28495
|
+
var rest = string.slice(matchedString.length);
|
|
28504
28496
|
return {
|
|
28505
28497
|
value: value,
|
|
28506
|
-
rest:
|
|
28498
|
+
rest: rest
|
|
28507
28499
|
};
|
|
28508
28500
|
};
|
|
28509
28501
|
}
|
|
28510
28502
|
|
|
28511
28503
|
function buildMatchFn$1(args) {
|
|
28512
|
-
return function (
|
|
28513
|
-
var
|
|
28514
|
-
var options = dirtyOptions || {};
|
|
28504
|
+
return function (string) {
|
|
28505
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
28515
28506
|
var width = options.width;
|
|
28516
28507
|
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
28517
28508
|
var matchResult = string.match(matchPattern);
|
|
@@ -28522,23 +28513,18 @@
|
|
|
28522
28513
|
|
|
28523
28514
|
var matchedString = matchResult[0];
|
|
28524
28515
|
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
28516
|
+
var key = Array.isArray(parsePatterns) ? findIndex$1(parsePatterns, function (pattern) {
|
|
28517
|
+
return pattern.test(matchedString);
|
|
28518
|
+
}) : findKey$1(parsePatterns, function (pattern) {
|
|
28519
|
+
return pattern.test(matchedString);
|
|
28520
|
+
});
|
|
28525
28521
|
var value;
|
|
28526
|
-
|
|
28527
|
-
if (Object.prototype.toString.call(parsePatterns) === '[object Array]') {
|
|
28528
|
-
value = findIndex$1(parsePatterns, function (pattern) {
|
|
28529
|
-
return pattern.test(string);
|
|
28530
|
-
});
|
|
28531
|
-
} else {
|
|
28532
|
-
value = findKey$1(parsePatterns, function (pattern) {
|
|
28533
|
-
return pattern.test(string);
|
|
28534
|
-
});
|
|
28535
|
-
}
|
|
28536
|
-
|
|
28537
|
-
value = args.valueCallback ? args.valueCallback(value) : value;
|
|
28522
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
28538
28523
|
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
28524
|
+
var rest = string.slice(matchedString.length);
|
|
28539
28525
|
return {
|
|
28540
28526
|
value: value,
|
|
28541
|
-
rest:
|
|
28527
|
+
rest: rest
|
|
28542
28528
|
};
|
|
28543
28529
|
};
|
|
28544
28530
|
}
|
|
@@ -28549,6 +28535,8 @@
|
|
|
28549
28535
|
return key;
|
|
28550
28536
|
}
|
|
28551
28537
|
}
|
|
28538
|
+
|
|
28539
|
+
return undefined;
|
|
28552
28540
|
}
|
|
28553
28541
|
|
|
28554
28542
|
function findIndex$1(array, predicate) {
|
|
@@ -28557,6 +28545,8 @@
|
|
|
28557
28545
|
return key;
|
|
28558
28546
|
}
|
|
28559
28547
|
}
|
|
28548
|
+
|
|
28549
|
+
return undefined;
|
|
28560
28550
|
}
|
|
28561
28551
|
|
|
28562
28552
|
var matchOrdinalNumberPattern$9 = /^(\d+)(th|st|nd|rd)?/i;
|
|
@@ -28693,13 +28683,13 @@
|
|
|
28693
28683
|
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
28694
28684
|
*
|
|
28695
28685
|
* @param {Date|Number} date - the date to be changed
|
|
28696
|
-
* @param {Number} amount - the amount of milliseconds to be subtracted
|
|
28686
|
+
* @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
|
|
28697
28687
|
* @returns {Date} the new date with the milliseconds subtracted
|
|
28698
28688
|
* @throws {TypeError} 2 arguments required
|
|
28699
28689
|
*
|
|
28700
28690
|
* @example
|
|
28701
28691
|
* // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:
|
|
28702
|
-
*
|
|
28692
|
+
* const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
|
28703
28693
|
* //=> Thu Jul 10 2014 12:45:29.250
|
|
28704
28694
|
*/
|
|
28705
28695
|
|
|
@@ -28765,9 +28755,11 @@
|
|
|
28765
28755
|
switch (token) {
|
|
28766
28756
|
case 'a':
|
|
28767
28757
|
case 'aa':
|
|
28768
|
-
case 'aaa':
|
|
28769
28758
|
return dayPeriodEnumValue.toUpperCase();
|
|
28770
28759
|
|
|
28760
|
+
case 'aaa':
|
|
28761
|
+
return dayPeriodEnumValue;
|
|
28762
|
+
|
|
28771
28763
|
case 'aaaaa':
|
|
28772
28764
|
return dayPeriodEnumValue[0];
|
|
28773
28765
|
|
|
@@ -28972,53 +28964,53 @@
|
|
|
28972
28964
|
afternoon: 'afternoon',
|
|
28973
28965
|
evening: 'evening',
|
|
28974
28966
|
night: 'night'
|
|
28975
|
-
/*
|
|
28976
|
-
* | | Unit | | Unit |
|
|
28977
|
-
* |-----|--------------------------------|-----|--------------------------------|
|
|
28978
|
-
* | a | AM, PM | A* | Milliseconds in day |
|
|
28979
|
-
* | b | AM, PM, noon, midnight | B | Flexible day period |
|
|
28980
|
-
* | c | Stand-alone local day of week | C* | Localized hour w/ day period |
|
|
28981
|
-
* | d | Day of month | D | Day of year |
|
|
28982
|
-
* | e | Local day of week | E | Day of week |
|
|
28983
|
-
* | f | | F* | Day of week in month |
|
|
28984
|
-
* | g* | Modified Julian day | G | Era |
|
|
28985
|
-
* | h | Hour [1-12] | H | Hour [0-23] |
|
|
28986
|
-
* | i! | ISO day of week | I! | ISO week of year |
|
|
28987
|
-
* | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
|
|
28988
|
-
* | k | Hour [1-24] | K | Hour [0-11] |
|
|
28989
|
-
* | l* | (deprecated) | L | Stand-alone month |
|
|
28990
|
-
* | m | Minute | M | Month |
|
|
28991
|
-
* | n | | N | |
|
|
28992
|
-
* | o! | Ordinal number modifier | O | Timezone (GMT) |
|
|
28993
|
-
* | p! | Long localized time | P! | Long localized date |
|
|
28994
|
-
* | q | Stand-alone quarter | Q | Quarter |
|
|
28995
|
-
* | r* | Related Gregorian year | R! | ISO week-numbering year |
|
|
28996
|
-
* | s | Second | S | Fraction of second |
|
|
28997
|
-
* | t! | Seconds timestamp | T! | Milliseconds timestamp |
|
|
28998
|
-
* | u | Extended year | U* | Cyclic year |
|
|
28999
|
-
* | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
|
|
29000
|
-
* | w | Local week of year | W* | Week of month |
|
|
29001
|
-
* | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
|
|
29002
|
-
* | y | Year (abs) | Y | Local week-numbering year |
|
|
29003
|
-
* | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
|
|
29004
|
-
*
|
|
29005
|
-
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
29006
|
-
*
|
|
29007
|
-
* Letters marked by ! are non-standard, but implemented by date-fns:
|
|
29008
|
-
* - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
|
|
29009
|
-
* - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
|
|
29010
|
-
* i.e. 7 for Sunday, 1 for Monday, etc.
|
|
29011
|
-
* - `I` is ISO week of year, as opposed to `w` which is local week of year.
|
|
29012
|
-
* - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
|
|
29013
|
-
* `R` is supposed to be used in conjunction with `I` and `i`
|
|
29014
|
-
* for universal ISO week-numbering date, whereas
|
|
29015
|
-
* `Y` is supposed to be used in conjunction with `w` and `e`
|
|
29016
|
-
* for week-numbering date specific to the locale.
|
|
29017
|
-
* - `P` is long localized date format
|
|
29018
|
-
* - `p` is long localized time format
|
|
29019
|
-
*/
|
|
29020
|
-
|
|
29021
28967
|
};
|
|
28968
|
+
/*
|
|
28969
|
+
* | | Unit | | Unit |
|
|
28970
|
+
* |-----|--------------------------------|-----|--------------------------------|
|
|
28971
|
+
* | a | AM, PM | A* | Milliseconds in day |
|
|
28972
|
+
* | b | AM, PM, noon, midnight | B | Flexible day period |
|
|
28973
|
+
* | c | Stand-alone local day of week | C* | Localized hour w/ day period |
|
|
28974
|
+
* | d | Day of month | D | Day of year |
|
|
28975
|
+
* | e | Local day of week | E | Day of week |
|
|
28976
|
+
* | f | | F* | Day of week in month |
|
|
28977
|
+
* | g* | Modified Julian day | G | Era |
|
|
28978
|
+
* | h | Hour [1-12] | H | Hour [0-23] |
|
|
28979
|
+
* | i! | ISO day of week | I! | ISO week of year |
|
|
28980
|
+
* | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
|
|
28981
|
+
* | k | Hour [1-24] | K | Hour [0-11] |
|
|
28982
|
+
* | l* | (deprecated) | L | Stand-alone month |
|
|
28983
|
+
* | m | Minute | M | Month |
|
|
28984
|
+
* | n | | N | |
|
|
28985
|
+
* | o! | Ordinal number modifier | O | Timezone (GMT) |
|
|
28986
|
+
* | p! | Long localized time | P! | Long localized date |
|
|
28987
|
+
* | q | Stand-alone quarter | Q | Quarter |
|
|
28988
|
+
* | r* | Related Gregorian year | R! | ISO week-numbering year |
|
|
28989
|
+
* | s | Second | S | Fraction of second |
|
|
28990
|
+
* | t! | Seconds timestamp | T! | Milliseconds timestamp |
|
|
28991
|
+
* | u | Extended year | U* | Cyclic year |
|
|
28992
|
+
* | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
|
|
28993
|
+
* | w | Local week of year | W* | Week of month |
|
|
28994
|
+
* | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
|
|
28995
|
+
* | y | Year (abs) | Y | Local week-numbering year |
|
|
28996
|
+
* | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
|
|
28997
|
+
*
|
|
28998
|
+
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
28999
|
+
*
|
|
29000
|
+
* Letters marked by ! are non-standard, but implemented by date-fns:
|
|
29001
|
+
* - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
|
|
29002
|
+
* - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
|
|
29003
|
+
* i.e. 7 for Sunday, 1 for Monday, etc.
|
|
29004
|
+
* - `I` is ISO week of year, as opposed to `w` which is local week of year.
|
|
29005
|
+
* - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
|
|
29006
|
+
* `R` is supposed to be used in conjunction with `I` and `i`
|
|
29007
|
+
* for universal ISO week-numbering date, whereas
|
|
29008
|
+
* `Y` is supposed to be used in conjunction with `w` and `e`
|
|
29009
|
+
* for week-numbering date specific to the locale.
|
|
29010
|
+
* - `P` is long localized date format
|
|
29011
|
+
* - `p` is long localized time format
|
|
29012
|
+
*/
|
|
29013
|
+
|
|
29022
29014
|
var formatters$2 = {
|
|
29023
29015
|
// Era
|
|
29024
29016
|
G: function (date, token, localize) {
|
|
@@ -29504,12 +29496,17 @@
|
|
|
29504
29496
|
switch (token) {
|
|
29505
29497
|
case 'a':
|
|
29506
29498
|
case 'aa':
|
|
29507
|
-
case 'aaa':
|
|
29508
29499
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
29509
29500
|
width: 'abbreviated',
|
|
29510
29501
|
context: 'formatting'
|
|
29511
29502
|
});
|
|
29512
29503
|
|
|
29504
|
+
case 'aaa':
|
|
29505
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
29506
|
+
width: 'abbreviated',
|
|
29507
|
+
context: 'formatting'
|
|
29508
|
+
}).toLowerCase();
|
|
29509
|
+
|
|
29513
29510
|
case 'aaaaa':
|
|
29514
29511
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
29515
29512
|
width: 'narrow',
|
|
@@ -29540,12 +29537,17 @@
|
|
|
29540
29537
|
switch (token) {
|
|
29541
29538
|
case 'b':
|
|
29542
29539
|
case 'bb':
|
|
29543
|
-
case 'bbb':
|
|
29544
29540
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
29545
29541
|
width: 'abbreviated',
|
|
29546
29542
|
context: 'formatting'
|
|
29547
29543
|
});
|
|
29548
29544
|
|
|
29545
|
+
case 'bbb':
|
|
29546
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
29547
|
+
width: 'abbreviated',
|
|
29548
|
+
context: 'formatting'
|
|
29549
|
+
}).toLowerCase();
|
|
29550
|
+
|
|
29549
29551
|
case 'bbbbb':
|
|
29550
29552
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
29551
29553
|
width: 'narrow',
|
|
@@ -29915,15 +29917,15 @@
|
|
|
29915
29917
|
function isProtectedWeekYearToken$1(token) {
|
|
29916
29918
|
return protectedWeekYearTokens$1.indexOf(token) !== -1;
|
|
29917
29919
|
}
|
|
29918
|
-
function throwProtectedError$1(token) {
|
|
29920
|
+
function throwProtectedError$1(token, format, input) {
|
|
29919
29921
|
if (token === 'YYYY') {
|
|
29920
|
-
throw new RangeError(
|
|
29922
|
+
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
|
29921
29923
|
} else if (token === 'YY') {
|
|
29922
|
-
throw new RangeError(
|
|
29924
|
+
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
|
29923
29925
|
} else if (token === 'D') {
|
|
29924
|
-
throw new RangeError(
|
|
29926
|
+
throw new RangeError("Use `d` instead of `D` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
|
29925
29927
|
} else if (token === 'DD') {
|
|
29926
|
-
throw new RangeError(
|
|
29928
|
+
throw new RangeError("Use `dd` instead of `DD` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
|
29927
29929
|
}
|
|
29928
29930
|
}
|
|
29929
29931
|
|
|
@@ -30030,35 +30032,37 @@
|
|
|
30030
30032
|
* | | DD | 01, 02, ..., 365, 366 | 9 |
|
|
30031
30033
|
* | | DDD | 001, 002, ..., 365, 366 | |
|
|
30032
30034
|
* | | DDDD | ... | 3 |
|
|
30033
|
-
* | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ...,
|
|
30035
|
+
* | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |
|
|
30034
30036
|
* | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
|
|
30035
30037
|
* | | EEEEE | M, T, W, T, F, S, S | |
|
|
30036
30038
|
* | | EEEEEE | Mo, Tu, We, Th, Fr, Su, Sa | |
|
|
30037
30039
|
* | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |
|
|
30038
30040
|
* | | io | 1st, 2nd, ..., 7th | 7 |
|
|
30039
30041
|
* | | ii | 01, 02, ..., 07 | 7 |
|
|
30040
|
-
* | | iii | Mon, Tue, Wed, ...,
|
|
30042
|
+
* | | iii | Mon, Tue, Wed, ..., Sun | 7 |
|
|
30041
30043
|
* | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |
|
|
30042
30044
|
* | | iiiii | M, T, W, T, F, S, S | 7 |
|
|
30043
30045
|
* | | iiiiii | Mo, Tu, We, Th, Fr, Su, Sa | 7 |
|
|
30044
30046
|
* | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |
|
|
30045
30047
|
* | | eo | 2nd, 3rd, ..., 1st | 7 |
|
|
30046
30048
|
* | | ee | 02, 03, ..., 01 | |
|
|
30047
|
-
* | | eee | Mon, Tue, Wed, ...,
|
|
30049
|
+
* | | eee | Mon, Tue, Wed, ..., Sun | |
|
|
30048
30050
|
* | | eeee | Monday, Tuesday, ..., Sunday | 2 |
|
|
30049
30051
|
* | | eeeee | M, T, W, T, F, S, S | |
|
|
30050
30052
|
* | | eeeeee | Mo, Tu, We, Th, Fr, Su, Sa | |
|
|
30051
30053
|
* | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |
|
|
30052
30054
|
* | | co | 2nd, 3rd, ..., 1st | 7 |
|
|
30053
30055
|
* | | cc | 02, 03, ..., 01 | |
|
|
30054
|
-
* | | ccc | Mon, Tue, Wed, ...,
|
|
30056
|
+
* | | ccc | Mon, Tue, Wed, ..., Sun | |
|
|
30055
30057
|
* | | cccc | Monday, Tuesday, ..., Sunday | 2 |
|
|
30056
30058
|
* | | ccccc | M, T, W, T, F, S, S | |
|
|
30057
30059
|
* | | cccccc | Mo, Tu, We, Th, Fr, Su, Sa | |
|
|
30058
|
-
* | AM, PM | a..
|
|
30060
|
+
* | AM, PM | a..aa | AM, PM | |
|
|
30061
|
+
* | | aaa | am, pm | |
|
|
30059
30062
|
* | | aaaa | a.m., p.m. | 2 |
|
|
30060
30063
|
* | | aaaaa | a, p | |
|
|
30061
|
-
* | AM, PM, noon, midnight | b..
|
|
30064
|
+
* | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |
|
|
30065
|
+
* | | bbb | am, pm, noon, midnight | |
|
|
30062
30066
|
* | | bbbb | a.m., p.m., noon, midnight | 2 |
|
|
30063
30067
|
* | | bbbbb | a, p, n, mi | |
|
|
30064
30068
|
* | Flexible day period | B..BBB | at night, in the morning, ... | |
|
|
@@ -30072,7 +30076,7 @@
|
|
|
30072
30076
|
* | | HH | 00, 01, 02, ..., 23 | |
|
|
30073
30077
|
* | Hour [0-11] | K | 1, 2, ..., 11, 0 | |
|
|
30074
30078
|
* | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |
|
|
30075
|
-
* | | KK |
|
|
30079
|
+
* | | KK | 01, 02, ..., 11, 00 | |
|
|
30076
30080
|
* | Hour [1-24] | k | 24, 1, 2, ..., 23 | |
|
|
30077
30081
|
* | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |
|
|
30078
30082
|
* | | kk | 24, 01, 02, ..., 23 | |
|
|
@@ -30084,7 +30088,7 @@
|
|
|
30084
30088
|
* | | ss | 00, 01, ..., 59 | |
|
|
30085
30089
|
* | Fraction of second | S | 0, 1, ..., 9 | |
|
|
30086
30090
|
* | | SS | 00, 01, ..., 99 | |
|
|
30087
|
-
* | | SSS | 000,
|
|
30091
|
+
* | | SSS | 000, 001, ..., 999 | |
|
|
30088
30092
|
* | | SSSS | ... | 3 |
|
|
30089
30093
|
* | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |
|
|
30090
30094
|
* | | XX | -0800, +0530, Z | |
|
|
@@ -30104,18 +30108,18 @@
|
|
|
30104
30108
|
* | | tt | ... | 3,7 |
|
|
30105
30109
|
* | Milliseconds timestamp | T | 512969520900 | 7 |
|
|
30106
30110
|
* | | TT | ... | 3,7 |
|
|
30107
|
-
* | Long localized date | P |
|
|
30108
|
-
* | | PP |
|
|
30109
|
-
* | | PPP |
|
|
30110
|
-
* | | PPPP |
|
|
30111
|
+
* | Long localized date | P | 04/29/1453 | 7 |
|
|
30112
|
+
* | | PP | Apr 29, 1453 | 7 |
|
|
30113
|
+
* | | PPP | April 29th, 1453 | 7 |
|
|
30114
|
+
* | | PPPP | Friday, April 29th, 1453 | 2,7 |
|
|
30111
30115
|
* | Long localized time | p | 12:00 AM | 7 |
|
|
30112
30116
|
* | | pp | 12:00:00 AM | 7 |
|
|
30113
30117
|
* | | ppp | 12:00:00 AM GMT+2 | 7 |
|
|
30114
30118
|
* | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |
|
|
30115
|
-
* | Combination of date and time | Pp |
|
|
30116
|
-
* | | PPpp |
|
|
30117
|
-
* | | PPPppp |
|
|
30118
|
-
* | | PPPPpppp|
|
|
30119
|
+
* | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |
|
|
30120
|
+
* | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |
|
|
30121
|
+
* | | PPPppp | April 29th, 1453 at ... | 7 |
|
|
30122
|
+
* | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |
|
|
30119
30123
|
* Notes:
|
|
30120
30124
|
* 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
|
|
30121
30125
|
* are the same as "stand-alone" units, but are different in some languages.
|
|
@@ -30230,10 +30234,10 @@
|
|
|
30230
30234
|
* @throws {RangeError} `options.locale` must contain `formatLong` property
|
|
30231
30235
|
* @throws {RangeError} `options.weekStartsOn` must be between 0 and 6
|
|
30232
30236
|
* @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7
|
|
30233
|
-
* @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years; see: https://git.io/fxCyr
|
|
30234
|
-
* @throws {RangeError} use `yy` instead of `YY` for formatting years; see: https://git.io/fxCyr
|
|
30235
|
-
* @throws {RangeError} use `d` instead of `D` for formatting days of the month; see: https://git.io/fxCyr
|
|
30236
|
-
* @throws {RangeError} use `dd` instead of `DD` for formatting days of the month; see: https://git.io/fxCyr
|
|
30237
|
+
* @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr
|
|
30238
|
+
* @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr
|
|
30239
|
+
* @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr
|
|
30240
|
+
* @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr
|
|
30237
30241
|
* @throws {RangeError} format string contains an unescaped latin alphabet character
|
|
30238
30242
|
*
|
|
30239
30243
|
* @example
|
|
@@ -30326,11 +30330,11 @@
|
|
|
30326
30330
|
|
|
30327
30331
|
if (formatter) {
|
|
30328
30332
|
if (!options.useAdditionalWeekYearTokens && isProtectedWeekYearToken$1(substring)) {
|
|
30329
|
-
throwProtectedError$1(substring);
|
|
30333
|
+
throwProtectedError$1(substring, dirtyFormatStr, dirtyDate);
|
|
30330
30334
|
}
|
|
30331
30335
|
|
|
30332
30336
|
if (!options.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken$1(substring)) {
|
|
30333
|
-
throwProtectedError$1(substring);
|
|
30337
|
+
throwProtectedError$1(substring, dirtyFormatStr, dirtyDate);
|
|
30334
30338
|
}
|
|
30335
30339
|
|
|
30336
30340
|
return formatter(utcDate, substring, locale.localize, formatterOptions);
|
|
@@ -30349,6 +30353,35 @@
|
|
|
30349
30353
|
return input.match(escapedStringRegExp$2)[1].replace(doubleQuoteRegExp$2, "'");
|
|
30350
30354
|
}
|
|
30351
30355
|
|
|
30356
|
+
/**
|
|
30357
|
+
* @name subDays
|
|
30358
|
+
* @category Day Helpers
|
|
30359
|
+
* @summary Subtract the specified number of days from the given date.
|
|
30360
|
+
*
|
|
30361
|
+
* @description
|
|
30362
|
+
* Subtract the specified number of days from the given date.
|
|
30363
|
+
*
|
|
30364
|
+
* ### v2.0.0 breaking changes:
|
|
30365
|
+
*
|
|
30366
|
+
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
30367
|
+
*
|
|
30368
|
+
* @param {Date|Number} date - the date to be changed
|
|
30369
|
+
* @param {Number} amount - the amount of days to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
|
|
30370
|
+
* @returns {Date} the new date with the days subtracted
|
|
30371
|
+
* @throws {TypeError} 2 arguments required
|
|
30372
|
+
*
|
|
30373
|
+
* @example
|
|
30374
|
+
* // Subtract 10 days from 1 September 2014:
|
|
30375
|
+
* const result = subDays(new Date(2014, 8, 1), 10)
|
|
30376
|
+
* //=> Fri Aug 22 2014 00:00:00
|
|
30377
|
+
*/
|
|
30378
|
+
|
|
30379
|
+
function subDays$1(dirtyDate, dirtyAmount) {
|
|
30380
|
+
requiredArgs$1(2, arguments);
|
|
30381
|
+
var amount = toInteger$1(dirtyAmount);
|
|
30382
|
+
return addDays$1(dirtyDate, -amount);
|
|
30383
|
+
}
|
|
30384
|
+
|
|
30352
30385
|
/**
|
|
30353
30386
|
* @name isAfter
|
|
30354
30387
|
* @category Common Helpers
|
|
@@ -30409,35 +30442,6 @@
|
|
|
30409
30442
|
return date.getTime() < dateToCompare.getTime();
|
|
30410
30443
|
}
|
|
30411
30444
|
|
|
30412
|
-
/**
|
|
30413
|
-
* @name subDays
|
|
30414
|
-
* @category Day Helpers
|
|
30415
|
-
* @summary Subtract the specified number of days from the given date.
|
|
30416
|
-
*
|
|
30417
|
-
* @description
|
|
30418
|
-
* Subtract the specified number of days from the given date.
|
|
30419
|
-
*
|
|
30420
|
-
* ### v2.0.0 breaking changes:
|
|
30421
|
-
*
|
|
30422
|
-
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
30423
|
-
*
|
|
30424
|
-
* @param {Date|Number} date - the date to be changed
|
|
30425
|
-
* @param {Number} amount - the amount of days to be subtracted
|
|
30426
|
-
* @returns {Date} the new date with the days subtracted
|
|
30427
|
-
* @throws {TypeError} 2 arguments required
|
|
30428
|
-
*
|
|
30429
|
-
* @example
|
|
30430
|
-
* // Subtract 10 days from 1 September 2014:
|
|
30431
|
-
* var result = subDays(new Date(2014, 8, 1), 10)
|
|
30432
|
-
* //=> Fri Aug 22 2014 00:00:00
|
|
30433
|
-
*/
|
|
30434
|
-
|
|
30435
|
-
function subDays$1(dirtyDate, dirtyAmount) {
|
|
30436
|
-
requiredArgs$1(2, arguments);
|
|
30437
|
-
var amount = toInteger$1(dirtyAmount);
|
|
30438
|
-
return addDays$1(dirtyDate, -amount);
|
|
30439
|
-
}
|
|
30440
|
-
|
|
30441
30445
|
/**
|
|
30442
30446
|
* @name setMinutes
|
|
30443
30447
|
* @category Minute Helpers
|
|
@@ -30457,7 +30461,7 @@
|
|
|
30457
30461
|
*
|
|
30458
30462
|
* @example
|
|
30459
30463
|
* // Set 45 minutes to 1 September 2014 11:30:40:
|
|
30460
|
-
*
|
|
30464
|
+
* const result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45)
|
|
30461
30465
|
* //=> Mon Sep 01 2014 11:45:40
|
|
30462
30466
|
*/
|
|
30463
30467
|
|
|
@@ -37784,6 +37788,26 @@
|
|
|
37784
37788
|
other: '{{count}} Tagen'
|
|
37785
37789
|
}
|
|
37786
37790
|
},
|
|
37791
|
+
aboutXWeeks: {
|
|
37792
|
+
standalone: {
|
|
37793
|
+
one: 'etwa ein Woche',
|
|
37794
|
+
other: 'etwa {{count}} Wochen'
|
|
37795
|
+
},
|
|
37796
|
+
withPreposition: {
|
|
37797
|
+
one: 'etwa einem Woche',
|
|
37798
|
+
other: 'etwa {{count}} Wochen'
|
|
37799
|
+
}
|
|
37800
|
+
},
|
|
37801
|
+
xWeeks: {
|
|
37802
|
+
standalone: {
|
|
37803
|
+
one: 'ein Woche',
|
|
37804
|
+
other: '{{count}} Wochen'
|
|
37805
|
+
},
|
|
37806
|
+
withPreposition: {
|
|
37807
|
+
one: 'einem Woche',
|
|
37808
|
+
other: '{{count}} Wochen'
|
|
37809
|
+
}
|
|
37810
|
+
},
|
|
37787
37811
|
aboutXMonths: {
|
|
37788
37812
|
standalone: {
|
|
37789
37813
|
one: 'etwa ein Monat',
|
|
@@ -37845,7 +37869,8 @@
|
|
|
37845
37869
|
}
|
|
37846
37870
|
}
|
|
37847
37871
|
};
|
|
37848
|
-
|
|
37872
|
+
|
|
37873
|
+
var formatDistance$7 = function (token, count, options) {
|
|
37849
37874
|
options = options || {};
|
|
37850
37875
|
var usageGroup = options.addSuffix ? formatDistanceLocale$7[token].withPreposition : formatDistanceLocale$7[token].standalone;
|
|
37851
37876
|
var result;
|
|
@@ -37855,11 +37880,11 @@
|
|
|
37855
37880
|
} else if (count === 1) {
|
|
37856
37881
|
result = usageGroup.one;
|
|
37857
37882
|
} else {
|
|
37858
|
-
result = usageGroup.other.replace('{{count}}', count);
|
|
37883
|
+
result = usageGroup.other.replace('{{count}}', String(count));
|
|
37859
37884
|
}
|
|
37860
37885
|
|
|
37861
37886
|
if (options.addSuffix) {
|
|
37862
|
-
if (options.comparison > 0) {
|
|
37887
|
+
if (options.comparison && options.comparison > 0) {
|
|
37863
37888
|
return 'in ' + result;
|
|
37864
37889
|
} else {
|
|
37865
37890
|
return 'vor ' + result;
|
|
@@ -37867,14 +37892,15 @@
|
|
|
37867
37892
|
}
|
|
37868
37893
|
|
|
37869
37894
|
return result;
|
|
37870
|
-
}
|
|
37895
|
+
};
|
|
37871
37896
|
|
|
37897
|
+
// DIN 5008: https://de.wikipedia.org/wiki/Datumsformat#DIN_5008
|
|
37872
37898
|
var dateFormats$7 = {
|
|
37873
37899
|
full: 'EEEE, do MMMM y',
|
|
37874
37900
|
// Montag, 7. Januar 2018
|
|
37875
37901
|
long: 'do MMMM y',
|
|
37876
37902
|
// 7. Januar 2018
|
|
37877
|
-
medium: 'do MMM
|
|
37903
|
+
medium: 'do MMM y',
|
|
37878
37904
|
// 7. Jan. 2018
|
|
37879
37905
|
short: 'dd.MM.y' // 07.01.2018
|
|
37880
37906
|
|
|
@@ -37914,9 +37940,10 @@
|
|
|
37914
37940
|
nextWeek: "eeee 'um' p",
|
|
37915
37941
|
other: 'P'
|
|
37916
37942
|
};
|
|
37917
|
-
|
|
37943
|
+
|
|
37944
|
+
var formatRelative$7 = function (token, _date, _baseDate, _options) {
|
|
37918
37945
|
return formatRelativeLocale$7[token];
|
|
37919
|
-
}
|
|
37946
|
+
};
|
|
37920
37947
|
|
|
37921
37948
|
var eraValues$7 = {
|
|
37922
37949
|
narrow: ['v.Chr.', 'n.Chr.'],
|
|
@@ -37926,24 +37953,24 @@
|
|
|
37926
37953
|
var quarterValues$7 = {
|
|
37927
37954
|
narrow: ['1', '2', '3', '4'],
|
|
37928
37955
|
abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
|
|
37929
|
-
wide: ['1. Quartal', '2. Quartal', '3. Quartal', '4. Quartal']
|
|
37930
|
-
|
|
37931
|
-
|
|
37932
|
-
|
|
37956
|
+
wide: ['1. Quartal', '2. Quartal', '3. Quartal', '4. Quartal']
|
|
37957
|
+
}; // Note: in German, the names of days of the week and months are capitalized.
|
|
37958
|
+
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
|
|
37959
|
+
// Generally, formatted dates should look like they are in the middle of a sentence,
|
|
37960
|
+
// e.g. in Spanish language the weekdays and months should be in the lowercase.
|
|
37933
37961
|
|
|
37934
|
-
};
|
|
37935
37962
|
var monthValues$7 = {
|
|
37936
37963
|
narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
|
|
37937
|
-
abbreviated: ['Jan', 'Feb', '
|
|
37964
|
+
abbreviated: ['Jan.', 'Feb.', 'März', 'Apr.', 'Mai', 'Juni', 'Juli', 'Aug.', 'Sep.', 'Okt.', 'Nov.', 'Dez.'],
|
|
37938
37965
|
wide: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember']
|
|
37939
37966
|
};
|
|
37940
37967
|
var dayValues$7 = {
|
|
37941
37968
|
narrow: ['S', 'M', 'D', 'M', 'D', 'F', 'S'],
|
|
37942
37969
|
short: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
|
|
37943
37970
|
abbreviated: ['So.', 'Mo.', 'Di.', 'Mi.', 'Do.', 'Fr.', 'Sa.'],
|
|
37944
|
-
wide: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag']
|
|
37971
|
+
wide: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag']
|
|
37972
|
+
}; // https://www.unicode.org/cldr/charts/32/summary/de.html#1881
|
|
37945
37973
|
|
|
37946
|
-
};
|
|
37947
37974
|
var dayPeriodValues$7 = {
|
|
37948
37975
|
narrow: {
|
|
37949
37976
|
am: 'vm.',
|
|
@@ -38009,10 +38036,10 @@
|
|
|
38009
38036
|
}
|
|
38010
38037
|
};
|
|
38011
38038
|
|
|
38012
|
-
|
|
38039
|
+
var ordinalNumber$7 = function (dirtyNumber, _dirtyOptions) {
|
|
38013
38040
|
var number = Number(dirtyNumber);
|
|
38014
38041
|
return number + '.';
|
|
38015
|
-
}
|
|
38042
|
+
};
|
|
38016
38043
|
|
|
38017
38044
|
var localize$7 = {
|
|
38018
38045
|
ordinalNumber: ordinalNumber$7,
|
|
@@ -38024,7 +38051,7 @@
|
|
|
38024
38051
|
values: quarterValues$7,
|
|
38025
38052
|
defaultWidth: 'wide',
|
|
38026
38053
|
argumentCallback: function (quarter) {
|
|
38027
|
-
return
|
|
38054
|
+
return quarter - 1;
|
|
38028
38055
|
}
|
|
38029
38056
|
}),
|
|
38030
38057
|
month: buildLocalizeFn$1({
|
|
@@ -38103,7 +38130,7 @@
|
|
|
38103
38130
|
matchPattern: matchOrdinalNumberPattern$7,
|
|
38104
38131
|
parsePattern: parseOrdinalNumberPattern$7,
|
|
38105
38132
|
valueCallback: function (value) {
|
|
38106
|
-
return parseInt(value
|
|
38133
|
+
return parseInt(value);
|
|
38107
38134
|
}
|
|
38108
38135
|
}),
|
|
38109
38136
|
era: buildMatchFn$1({
|
|
@@ -38153,7 +38180,6 @@
|
|
|
38153
38180
|
* @author RomanErnst [@pex]{@link https://github.com/pex}
|
|
38154
38181
|
* @author Philipp Keck [@Philipp91]{@link https://github.com/Philipp91}
|
|
38155
38182
|
*/
|
|
38156
|
-
|
|
38157
38183
|
var locale$7 = {
|
|
38158
38184
|
code: 'de',
|
|
38159
38185
|
formatDistance: formatDistance$7,
|
|
@@ -38199,6 +38225,14 @@
|
|
|
38199
38225
|
one: '1 día',
|
|
38200
38226
|
other: '{{count}} días'
|
|
38201
38227
|
},
|
|
38228
|
+
aboutXWeeks: {
|
|
38229
|
+
one: 'alrededor de 1 semana',
|
|
38230
|
+
other: 'alrededor de {{count}} semanas'
|
|
38231
|
+
},
|
|
38232
|
+
xWeeks: {
|
|
38233
|
+
one: '1 semana',
|
|
38234
|
+
other: '{{count}} semanas'
|
|
38235
|
+
},
|
|
38202
38236
|
aboutXMonths: {
|
|
38203
38237
|
one: 'alrededor de 1 mes',
|
|
38204
38238
|
other: 'alrededor de {{count}} meses'
|
|
@@ -38248,8 +38282,8 @@
|
|
|
38248
38282
|
}
|
|
38249
38283
|
|
|
38250
38284
|
var dateFormats$6 = {
|
|
38251
|
-
full: "EEEE, d 'de' MMMM y",
|
|
38252
|
-
long: "d 'de' MMMM y",
|
|
38285
|
+
full: "EEEE, d 'de' MMMM 'de' y",
|
|
38286
|
+
long: "d 'de' MMMM 'de' y",
|
|
38253
38287
|
medium: 'd MMM y',
|
|
38254
38288
|
short: 'dd/MM/y'
|
|
38255
38289
|
};
|
|
@@ -38322,7 +38356,7 @@
|
|
|
38322
38356
|
var dayValues$6 = {
|
|
38323
38357
|
narrow: ['d', 'l', 'm', 'm', 'j', 'v', 's'],
|
|
38324
38358
|
short: ['do', 'lu', 'ma', 'mi', 'ju', 'vi', 'sa'],
|
|
38325
|
-
abbreviated: ['dom', 'lun', 'mar', 'mié', 'jue', 'vie', '
|
|
38359
|
+
abbreviated: ['dom', 'lun', 'mar', 'mié', 'jue', 'vie', 'sáb'],
|
|
38326
38360
|
wide: ['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado']
|
|
38327
38361
|
};
|
|
38328
38362
|
var dayPeriodValues$6 = {
|
|
@@ -38456,7 +38490,7 @@
|
|
|
38456
38490
|
narrow: /^[dlmjvs]/i,
|
|
38457
38491
|
short: /^(do|lu|ma|mi|ju|vi|sa)/i,
|
|
38458
38492
|
abbreviated: /^(dom|lun|mar|mie|jue|vie|sab)/i,
|
|
38459
|
-
wide: /^(domingo|lunes|martes|
|
|
38493
|
+
wide: /^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i
|
|
38460
38494
|
};
|
|
38461
38495
|
var parseDayPatterns$6 = {
|
|
38462
38496
|
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
|
|
@@ -38579,6 +38613,14 @@
|
|
|
38579
38613
|
one: '1 jour',
|
|
38580
38614
|
other: '{{count}} jours'
|
|
38581
38615
|
},
|
|
38616
|
+
aboutXWeeks: {
|
|
38617
|
+
one: 'environ 1 semaine',
|
|
38618
|
+
other: 'environ {{count}} semaines'
|
|
38619
|
+
},
|
|
38620
|
+
xWeeks: {
|
|
38621
|
+
one: '1 semaine',
|
|
38622
|
+
other: '{{count}} semaines'
|
|
38623
|
+
},
|
|
38582
38624
|
aboutXMonths: {
|
|
38583
38625
|
one: 'environ 1 mois',
|
|
38584
38626
|
other: 'environ {{count}} mois'
|
|
@@ -38897,7 +38939,7 @@
|
|
|
38897
38939
|
weekStartsOn: 1
|
|
38898
38940
|
/* Monday */
|
|
38899
38941
|
,
|
|
38900
|
-
firstWeekContainsDate:
|
|
38942
|
+
firstWeekContainsDate: 4
|
|
38901
38943
|
}
|
|
38902
38944
|
};
|
|
38903
38945
|
|
|
@@ -38931,6 +38973,14 @@
|
|
|
38931
38973
|
one: '1 dag',
|
|
38932
38974
|
other: '{{count}} dagen'
|
|
38933
38975
|
},
|
|
38976
|
+
aboutXWeeks: {
|
|
38977
|
+
one: 'ongeveer 1 week',
|
|
38978
|
+
other: 'ongeveer {{count}} weken'
|
|
38979
|
+
},
|
|
38980
|
+
xWeeks: {
|
|
38981
|
+
one: '1 week',
|
|
38982
|
+
other: '{{count}} weken'
|
|
38983
|
+
},
|
|
38934
38984
|
aboutXMonths: {
|
|
38935
38985
|
one: 'ongeveer 1 maand',
|
|
38936
38986
|
other: 'ongeveer {{count}} maanden'
|
|
@@ -39036,7 +39086,7 @@
|
|
|
39036
39086
|
};
|
|
39037
39087
|
var monthValues$4 = {
|
|
39038
39088
|
narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
|
|
39039
|
-
abbreviated: ['jan.', 'feb.', 'mrt.', 'apr.', 'mei
|
|
39089
|
+
abbreviated: ['jan.', 'feb.', 'mrt.', 'apr.', 'mei', 'jun.', 'jul.', 'aug.', 'sep.', 'okt.', 'nov.', 'dec.'],
|
|
39040
39090
|
wide: ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december']
|
|
39041
39091
|
};
|
|
39042
39092
|
var dayValues$4 = {
|
|
@@ -39051,30 +39101,30 @@
|
|
|
39051
39101
|
pm: 'PM',
|
|
39052
39102
|
midnight: 'middernacht',
|
|
39053
39103
|
noon: 'het middaguur',
|
|
39054
|
-
morning: '
|
|
39055
|
-
afternoon: '
|
|
39056
|
-
evening: '
|
|
39057
|
-
night: '
|
|
39104
|
+
morning: "'s ochtends",
|
|
39105
|
+
afternoon: "'s middags",
|
|
39106
|
+
evening: "'s avonds",
|
|
39107
|
+
night: "'s nachts"
|
|
39058
39108
|
},
|
|
39059
39109
|
abbreviated: {
|
|
39060
39110
|
am: 'AM',
|
|
39061
39111
|
pm: 'PM',
|
|
39062
39112
|
midnight: 'middernacht',
|
|
39063
39113
|
noon: 'het middaguur',
|
|
39064
|
-
morning: '
|
|
39065
|
-
afternoon: '
|
|
39066
|
-
evening: '
|
|
39067
|
-
night: '
|
|
39114
|
+
morning: "'s ochtends",
|
|
39115
|
+
afternoon: "'s middags",
|
|
39116
|
+
evening: "'s avonds",
|
|
39117
|
+
night: "'s nachts"
|
|
39068
39118
|
},
|
|
39069
39119
|
wide: {
|
|
39070
39120
|
am: 'AM',
|
|
39071
39121
|
pm: 'PM',
|
|
39072
39122
|
midnight: 'middernacht',
|
|
39073
39123
|
noon: 'het middaguur',
|
|
39074
|
-
morning: '
|
|
39075
|
-
afternoon: '
|
|
39076
|
-
evening: '
|
|
39077
|
-
night: '
|
|
39124
|
+
morning: "'s ochtends",
|
|
39125
|
+
afternoon: "'s middags",
|
|
39126
|
+
evening: "'s avonds",
|
|
39127
|
+
night: "'s nachts"
|
|
39078
39128
|
}
|
|
39079
39129
|
};
|
|
39080
39130
|
|
|
@@ -39130,7 +39180,7 @@
|
|
|
39130
39180
|
};
|
|
39131
39181
|
var matchMonthPatterns$4 = {
|
|
39132
39182
|
narrow: /^[jfmasond]/i,
|
|
39133
|
-
abbreviated: /^(jan
|
|
39183
|
+
abbreviated: /^(jan.|feb.|mrt.|apr.|mei|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,
|
|
39134
39184
|
wide: /^(januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december)/i
|
|
39135
39185
|
};
|
|
39136
39186
|
var parseMonthPatterns$4 = {
|
|
@@ -39305,7 +39355,7 @@
|
|
|
39305
39355
|
},
|
|
39306
39356
|
aboutXHours: {
|
|
39307
39357
|
one: {
|
|
39308
|
-
regular: 'około
|
|
39358
|
+
regular: 'około godziny',
|
|
39309
39359
|
past: 'około godziny',
|
|
39310
39360
|
future: 'około godzinę'
|
|
39311
39361
|
},
|
|
@@ -39330,6 +39380,16 @@
|
|
|
39330
39380
|
twoFour: '{{count}} dni',
|
|
39331
39381
|
other: '{{count}} dni'
|
|
39332
39382
|
},
|
|
39383
|
+
aboutXWeeks: {
|
|
39384
|
+
one: 'około tygodnia',
|
|
39385
|
+
twoFour: 'około {{count}} tygodni',
|
|
39386
|
+
other: 'około {{count}} tygodni'
|
|
39387
|
+
},
|
|
39388
|
+
xWeeks: {
|
|
39389
|
+
one: 'tydzień',
|
|
39390
|
+
twoFour: '{{count}} tygodnie',
|
|
39391
|
+
other: '{{count}} tygodni'
|
|
39392
|
+
},
|
|
39333
39393
|
aboutXMonths: {
|
|
39334
39394
|
one: 'około miesiąc',
|
|
39335
39395
|
twoFour: 'około {{count}} miesiące',
|
|
@@ -39772,6 +39832,14 @@
|
|
|
39772
39832
|
one: '1 dia',
|
|
39773
39833
|
other: '{{count}} dias'
|
|
39774
39834
|
},
|
|
39835
|
+
aboutXWeeks: {
|
|
39836
|
+
one: 'cerca de 1 semana',
|
|
39837
|
+
other: 'cerca de {{count}} semanas'
|
|
39838
|
+
},
|
|
39839
|
+
xWeeks: {
|
|
39840
|
+
one: '1 semana',
|
|
39841
|
+
other: '{{count}} semanas'
|
|
39842
|
+
},
|
|
39775
39843
|
aboutXMonths: {
|
|
39776
39844
|
one: 'cerca de 1 mês',
|
|
39777
39845
|
other: 'cerca de {{count}} meses'
|
|
@@ -39891,10 +39959,10 @@
|
|
|
39891
39959
|
wide: ['janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro']
|
|
39892
39960
|
};
|
|
39893
39961
|
var dayValues$2 = {
|
|
39894
|
-
narrow: ['
|
|
39895
|
-
short: ['
|
|
39896
|
-
abbreviated: ['
|
|
39897
|
-
wide: ['domingo', 'segunda', 'terça', 'quarta', 'quinta', 'sexta', 'sábado']
|
|
39962
|
+
narrow: ['D', 'S', 'T', 'Q', 'Q', 'S', 'S'],
|
|
39963
|
+
short: ['dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sab'],
|
|
39964
|
+
abbreviated: ['domingo', 'segunda', 'terça', 'quarta', 'quinta', 'sexta', 'sábado'],
|
|
39965
|
+
wide: ['domingo', 'segunda-feira', 'terça-feira', 'quarta-feira', 'quinta-feira', 'sexta-feira', 'sábado']
|
|
39898
39966
|
};
|
|
39899
39967
|
var dayPeriodValues$2 = {
|
|
39900
39968
|
narrow: {
|
|
@@ -40155,6 +40223,14 @@
|
|
|
40155
40223
|
one: '1 zi',
|
|
40156
40224
|
other: '{{count}} zile'
|
|
40157
40225
|
},
|
|
40226
|
+
aboutXWeeks: {
|
|
40227
|
+
one: 'circa o săptămână',
|
|
40228
|
+
other: 'circa {{count}} săptămâni'
|
|
40229
|
+
},
|
|
40230
|
+
xWeeks: {
|
|
40231
|
+
one: '1 săptămână',
|
|
40232
|
+
other: '{{count}} săptămâni'
|
|
40233
|
+
},
|
|
40158
40234
|
aboutXMonths: {
|
|
40159
40235
|
one: 'circa 1 lună',
|
|
40160
40236
|
other: 'circa {{count}} luni'
|
|
@@ -40521,6 +40597,14 @@
|
|
|
40521
40597
|
one: '1 天',
|
|
40522
40598
|
other: '{{count}} 天'
|
|
40523
40599
|
},
|
|
40600
|
+
aboutXWeeks: {
|
|
40601
|
+
one: '大约 1 个星期',
|
|
40602
|
+
other: '大约 {{count}} 个星期'
|
|
40603
|
+
},
|
|
40604
|
+
xWeeks: {
|
|
40605
|
+
one: '1 个星期',
|
|
40606
|
+
other: '{{count}} 个星期'
|
|
40607
|
+
},
|
|
40524
40608
|
aboutXMonths: {
|
|
40525
40609
|
one: '大约 1 个月',
|
|
40526
40610
|
other: '大约 {{count}} 个月'
|
|
@@ -40602,16 +40686,34 @@
|
|
|
40602
40686
|
})
|
|
40603
40687
|
};
|
|
40604
40688
|
|
|
40689
|
+
function checkWeek(_date, _baseDate, _options, baseFormat) {
|
|
40690
|
+
if (isSameUTCWeek(_date, _baseDate, _options)) {
|
|
40691
|
+
return baseFormat; // in same week
|
|
40692
|
+
} else if (_date.getTime() > _baseDate.getTime()) {
|
|
40693
|
+
return "'下个'" + baseFormat; // in next week
|
|
40694
|
+
}
|
|
40695
|
+
|
|
40696
|
+
return "'上个'" + baseFormat; // in last week
|
|
40697
|
+
}
|
|
40698
|
+
|
|
40605
40699
|
var formatRelativeLocale = {
|
|
40606
|
-
lastWeek:
|
|
40700
|
+
lastWeek: checkWeek,
|
|
40701
|
+
// days before yesterday, maybe in this week or last week
|
|
40607
40702
|
yesterday: "'昨天' p",
|
|
40608
40703
|
today: "'今天' p",
|
|
40609
40704
|
tomorrow: "'明天' p",
|
|
40610
|
-
nextWeek:
|
|
40611
|
-
|
|
40705
|
+
nextWeek: checkWeek,
|
|
40706
|
+
// days after tomorrow, maybe in this week or next week
|
|
40707
|
+
other: 'PP p'
|
|
40612
40708
|
};
|
|
40613
40709
|
function formatRelative(token, _date, _baseDate, _options) {
|
|
40614
|
-
|
|
40710
|
+
var format = formatRelativeLocale[token];
|
|
40711
|
+
|
|
40712
|
+
if (typeof format === 'function') {
|
|
40713
|
+
return format(_date, _baseDate, _options, 'eeee p');
|
|
40714
|
+
}
|
|
40715
|
+
|
|
40716
|
+
return format;
|
|
40615
40717
|
}
|
|
40616
40718
|
|
|
40617
40719
|
var eraValues = {
|
|
@@ -40714,11 +40816,22 @@
|
|
|
40714
40816
|
var options = dirtyOptions || {};
|
|
40715
40817
|
var unit = String(options.unit);
|
|
40716
40818
|
|
|
40717
|
-
|
|
40718
|
-
|
|
40719
|
-
|
|
40819
|
+
switch (unit) {
|
|
40820
|
+
case 'date':
|
|
40821
|
+
return number.toString() + '日';
|
|
40822
|
+
|
|
40823
|
+
case 'hour':
|
|
40824
|
+
return number.toString() + '时';
|
|
40825
|
+
|
|
40826
|
+
case 'minute':
|
|
40827
|
+
return number.toString() + '分';
|
|
40720
40828
|
|
|
40721
|
-
|
|
40829
|
+
case 'second':
|
|
40830
|
+
return number.toString() + '秒';
|
|
40831
|
+
|
|
40832
|
+
default:
|
|
40833
|
+
return '第 ' + number.toString();
|
|
40834
|
+
}
|
|
40722
40835
|
}
|
|
40723
40836
|
|
|
40724
40837
|
var localize = {
|
|
@@ -40750,7 +40863,7 @@
|
|
|
40750
40863
|
})
|
|
40751
40864
|
};
|
|
40752
40865
|
|
|
40753
|
-
var matchOrdinalNumberPattern = /^(第\s*)?\d
|
|
40866
|
+
var matchOrdinalNumberPattern = /^(第\s*)?\d+(日|时|分|秒)?/i;
|
|
40754
40867
|
var parseOrdinalNumberPattern = /\d+/i;
|
|
40755
40868
|
var matchEraPatterns = {
|
|
40756
40869
|
narrow: /^(前)/i,
|
|
@@ -40775,7 +40888,7 @@
|
|
|
40775
40888
|
};
|
|
40776
40889
|
var parseMonthPatterns = {
|
|
40777
40890
|
narrow: [/^一/i, /^二/i, /^三/i, /^四/i, /^五/i, /^六/i, /^七/i, /^八/i, /^九/i, /^十(?!(一|二))/i, /^十一/i, /^十二/i],
|
|
40778
|
-
any: [/^一|
|
|
40891
|
+
any: [/^一|1/i, /^二|2/i, /^三|3/i, /^四|4/i, /^五|5/i, /^六|6/i, /^七|7/i, /^八|8/i, /^九|9/i, /^十(?!(一|二))|10/i, /^十一|11/i, /^十二|12/i]
|
|
40779
40892
|
};
|
|
40780
40893
|
var matchDayPatterns = {
|
|
40781
40894
|
narrow: /^[一二三四五六日]/i,
|
|
@@ -40787,17 +40900,17 @@
|
|
|
40787
40900
|
any: [/日/i, /一/i, /二/i, /三/i, /四/i, /五/i, /六/i]
|
|
40788
40901
|
};
|
|
40789
40902
|
var matchDayPeriodPatterns = {
|
|
40790
|
-
any: /^(
|
|
40903
|
+
any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i
|
|
40791
40904
|
};
|
|
40792
40905
|
var parseDayPeriodPatterns = {
|
|
40793
40906
|
any: {
|
|
40794
|
-
am:
|
|
40795
|
-
pm:
|
|
40907
|
+
am: /^上午?/i,
|
|
40908
|
+
pm: /^下午?/i,
|
|
40796
40909
|
midnight: /^午夜/i,
|
|
40797
40910
|
noon: /^[中正]午/i,
|
|
40798
40911
|
morning: /^早上/i,
|
|
40799
40912
|
afternoon: /^下午/i,
|
|
40800
|
-
evening:
|
|
40913
|
+
evening: /^晚上?/i,
|
|
40801
40914
|
night: /^凌晨/i
|
|
40802
40915
|
}
|
|
40803
40916
|
};
|
|
@@ -40854,6 +40967,7 @@
|
|
|
40854
40967
|
* @author Song Shuoyun [@fnlctrl]{@link https://github.com/fnlctrl}
|
|
40855
40968
|
* @author sabrinaM [@sabrinamiao]{@link https://github.com/sabrinamiao}
|
|
40856
40969
|
* @author Carney Wu [@cubicwork]{@link https://github.com/cubicwork}
|
|
40970
|
+
* @author Terrence Lam [@skyuplam]{@link https://github.com/skyuplam}
|
|
40857
40971
|
*/
|
|
40858
40972
|
|
|
40859
40973
|
var locale = {
|