@cosmotech/core 1.5.0 → 1.5.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/index.cjs.js +4 -5
- package/dist/index.esm.js +4 -5
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -7995,7 +7995,7 @@ function buildLocalizeFn(args) {
|
|
|
7995
7995
|
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
7996
7996
|
}
|
|
7997
7997
|
|
|
7998
|
-
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
|
|
7998
|
+
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 challenge you to try to remove it!
|
|
7999
7999
|
|
|
8000
8000
|
return valuesArray[index];
|
|
8001
8001
|
};
|
|
@@ -8562,7 +8562,7 @@ function startOfUTCWeek(dirtyDate, dirtyOptions) {
|
|
|
8562
8562
|
|
|
8563
8563
|
function getUTCWeekYear(dirtyDate, dirtyOptions) {
|
|
8564
8564
|
requiredArgs(1, arguments);
|
|
8565
|
-
var date = toDate(dirtyDate
|
|
8565
|
+
var date = toDate(dirtyDate);
|
|
8566
8566
|
var year = date.getUTCFullYear();
|
|
8567
8567
|
var options = dirtyOptions || {};
|
|
8568
8568
|
var locale = options.locale;
|
|
@@ -9448,7 +9448,7 @@ var formatters = {
|
|
|
9448
9448
|
}
|
|
9449
9449
|
};
|
|
9450
9450
|
|
|
9451
|
-
function formatTimezoneShort(offset,
|
|
9451
|
+
function formatTimezoneShort(offset, delimiter) {
|
|
9452
9452
|
var sign = offset > 0 ? '-' : '+';
|
|
9453
9453
|
var absOffset = Math.abs(offset);
|
|
9454
9454
|
var hours = Math.floor(absOffset / 60);
|
|
@@ -9458,7 +9458,6 @@ function formatTimezoneShort(offset, dirtyDelimiter) {
|
|
|
9458
9458
|
return sign + String(hours);
|
|
9459
9459
|
}
|
|
9460
9460
|
|
|
9461
|
-
var delimiter = dirtyDelimiter || '';
|
|
9462
9461
|
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
9463
9462
|
}
|
|
9464
9463
|
|
|
@@ -9533,7 +9532,7 @@ function timeLongFormatter(pattern, formatLong) {
|
|
|
9533
9532
|
}
|
|
9534
9533
|
|
|
9535
9534
|
function dateTimeLongFormatter(pattern, formatLong) {
|
|
9536
|
-
var matchResult = pattern.match(/(P+)(p+)?/);
|
|
9535
|
+
var matchResult = pattern.match(/(P+)(p+)?/) || [];
|
|
9537
9536
|
var datePattern = matchResult[1];
|
|
9538
9537
|
var timePattern = matchResult[2];
|
|
9539
9538
|
|
package/dist/index.esm.js
CHANGED
|
@@ -7987,7 +7987,7 @@ function buildLocalizeFn(args) {
|
|
|
7987
7987
|
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
7988
7988
|
}
|
|
7989
7989
|
|
|
7990
|
-
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
|
|
7990
|
+
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 challenge you to try to remove it!
|
|
7991
7991
|
|
|
7992
7992
|
return valuesArray[index];
|
|
7993
7993
|
};
|
|
@@ -8554,7 +8554,7 @@ function startOfUTCWeek(dirtyDate, dirtyOptions) {
|
|
|
8554
8554
|
|
|
8555
8555
|
function getUTCWeekYear(dirtyDate, dirtyOptions) {
|
|
8556
8556
|
requiredArgs(1, arguments);
|
|
8557
|
-
var date = toDate(dirtyDate
|
|
8557
|
+
var date = toDate(dirtyDate);
|
|
8558
8558
|
var year = date.getUTCFullYear();
|
|
8559
8559
|
var options = dirtyOptions || {};
|
|
8560
8560
|
var locale = options.locale;
|
|
@@ -9440,7 +9440,7 @@ var formatters = {
|
|
|
9440
9440
|
}
|
|
9441
9441
|
};
|
|
9442
9442
|
|
|
9443
|
-
function formatTimezoneShort(offset,
|
|
9443
|
+
function formatTimezoneShort(offset, delimiter) {
|
|
9444
9444
|
var sign = offset > 0 ? '-' : '+';
|
|
9445
9445
|
var absOffset = Math.abs(offset);
|
|
9446
9446
|
var hours = Math.floor(absOffset / 60);
|
|
@@ -9450,7 +9450,6 @@ function formatTimezoneShort(offset, dirtyDelimiter) {
|
|
|
9450
9450
|
return sign + String(hours);
|
|
9451
9451
|
}
|
|
9452
9452
|
|
|
9453
|
-
var delimiter = dirtyDelimiter || '';
|
|
9454
9453
|
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
9455
9454
|
}
|
|
9456
9455
|
|
|
@@ -9525,7 +9524,7 @@ function timeLongFormatter(pattern, formatLong) {
|
|
|
9525
9524
|
}
|
|
9526
9525
|
|
|
9527
9526
|
function dateTimeLongFormatter(pattern, formatLong) {
|
|
9528
|
-
var matchResult = pattern.match(/(P+)(p+)?/);
|
|
9527
|
+
var matchResult = pattern.match(/(P+)(p+)?/) || [];
|
|
9529
9528
|
var datePattern = matchResult[1];
|
|
9530
9529
|
var timePattern = matchResult[2];
|
|
9531
9530
|
|