igniteui-i18n-core 1.0.2 → 1.0.3
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/formatters/date.formatter.js +10 -2
- package/package.json +2 -2
|
@@ -21,8 +21,16 @@ export class DateFormatter extends BaseFormatter {
|
|
|
21
21
|
if (typeof dateValue === 'string') {
|
|
22
22
|
// Workaround for ISO date without time or specified UTC explicitly
|
|
23
23
|
const match = isoRegex.exec(dateValue);
|
|
24
|
-
if (match && !match.groups?.time && !match.groups?.UTC) {
|
|
25
|
-
|
|
24
|
+
if (match?.groups && !match.groups?.time && !match.groups?.UTC) {
|
|
25
|
+
let day = '';
|
|
26
|
+
if (match.groups.day) {
|
|
27
|
+
day = `-${match.groups.day.length === 1 ? '0' : ''}${match.groups.day}`;
|
|
28
|
+
}
|
|
29
|
+
let month = '';
|
|
30
|
+
if (match.groups.month) {
|
|
31
|
+
month = `-${match.groups.month.length === 1 ? '0' : ''}${match.groups.month}`;
|
|
32
|
+
}
|
|
33
|
+
dateValue = `${match.groups.year}${month}${day}T00:00:00`;
|
|
26
34
|
}
|
|
27
35
|
}
|
|
28
36
|
return new Date(dateValue);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "igniteui-i18n-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "IgniteUI for Angular localization resources package",
|
|
5
5
|
"author": "Infragistics",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"igniteui-i18n-resources": "1.0.
|
|
34
|
+
"igniteui-i18n-resources": "1.0.3"
|
|
35
35
|
},
|
|
36
36
|
"peerDependenciesMeta": {
|
|
37
37
|
"igniteui-i18n-resources": {
|