@sumaris-net/ngx-components 1.22.12-rc2 → 1.22.12-rc3
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/bundles/sumaris-net.ngx-components.umd.js +4 -4
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/shared/dates.js +5 -5
- package/fesm2015/sumaris-net.ngx-components.js +4 -4
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
|
@@ -2900,14 +2900,14 @@
|
|
|
2900
2900
|
// Already a moment object: use it
|
|
2901
2901
|
if (!value || momentImported.isMoment(value))
|
|
2902
2902
|
return value;
|
|
2903
|
+
// Parse the input value, as a date only
|
|
2904
|
+
var dateOnly = moment$1(value, DATE_PATTERN);
|
|
2905
|
+
if (dateOnly.isValid())
|
|
2906
|
+
return DateUtils.markNoTime(dateOnly);
|
|
2903
2907
|
// Parse the input value, as a ISO date time
|
|
2904
2908
|
var date = moment$1(value, DATE_ISO_PATTERN);
|
|
2905
2909
|
if (date.isValid())
|
|
2906
2910
|
return date;
|
|
2907
|
-
// Parse the input value, as a date only
|
|
2908
|
-
var dateOnly = moment$1(value, DATE_PATTERN);
|
|
2909
|
-
if (dateOnly.isValid())
|
|
2910
|
-
return DateUtils.markNoTime(date);
|
|
2911
2911
|
// Not valid: trying to convert from unix timestamp
|
|
2912
2912
|
if (typeof value === 'string') {
|
|
2913
2913
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|