@pepperi-addons/ngx-lib 0.4.2-beta.321 → 0.4.2-beta.322
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/esm2020/core/common/services/utilities.service.mjs +8 -13
- package/fesm2015/pepperi-addons-ngx-lib.mjs +7 -12
- package/fesm2015/pepperi-addons-ngx-lib.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib.mjs +7 -12
- package/fesm2020/pepperi-addons-ngx-lib.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -458,19 +458,14 @@ class PepUtilitiesService {
|
|
|
458
458
|
if (!isDateTime) {
|
|
459
459
|
const index = dateStr.indexOf('T');
|
|
460
460
|
if (index > 0) {
|
|
461
|
-
|
|
462
|
-
// date. Stripping the T-prefix and parsing literally yields the UTC calendar date,
|
|
463
|
-
// which is one day behind for UTC+ users (e.g. NZ UTC+12).
|
|
464
|
-
retVal = new Date(retVal.getFullYear(), retVal.getMonth(), retVal.getDate(), 0, retVal.getTimezoneOffset() * -1);
|
|
461
|
+
dateStr = dateStr.substring(0, index);
|
|
465
462
|
}
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
retVal = new Date(year, month, day, 0, retVal.getTimezoneOffset() * -1);
|
|
473
|
-
}
|
|
463
|
+
const dateText = dateStr.split('-');
|
|
464
|
+
if (dateText.length === 3) {
|
|
465
|
+
const year = Number(dateText[0]);
|
|
466
|
+
const month = Number(dateText[1]) - 1;
|
|
467
|
+
const day = Number(dateText[2]);
|
|
468
|
+
retVal = new Date(year, month, day, 0, retVal.getTimezoneOffset() * -1);
|
|
474
469
|
}
|
|
475
470
|
}
|
|
476
471
|
else {
|