@sumaris-net/ngx-components 1.18.6 → 1.18.7
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 +8 -2
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +3 -0
- package/esm2015/src/app/shared/dates.js +3 -3
- package/esm2015/src/app/shared/pipes/date-format.pipe.js +7 -1
- package/fesm2015/sumaris-net.ngx-components.js +8 -2
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/pipes/date-format.pipe.d.ts +2 -0
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -2261,6 +2261,12 @@
|
|
|
2261
2261
|
var date = momentImported.isMoment(value) ? value : this.dateAdapter.parse(value, DATE_ISO_PATTERN);
|
|
2262
2262
|
return date && this.dateAdapter.format(date, pattern) || '';
|
|
2263
2263
|
};
|
|
2264
|
+
DateFormatPipe.prototype.format = function (date, pattern) {
|
|
2265
|
+
return this.dateAdapter.format(date, pattern);
|
|
2266
|
+
};
|
|
2267
|
+
DateFormatPipe.prototype.parse = function (value, parseFormat) {
|
|
2268
|
+
return momentImported.isMoment(value) ? value : this.dateAdapter.parse(value, parseFormat || DATE_ISO_PATTERN);
|
|
2269
|
+
};
|
|
2264
2270
|
return DateFormatPipe;
|
|
2265
2271
|
}());
|
|
2266
2272
|
DateFormatPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function DateFormatPipe_Factory() { return new DateFormatPipe(i0__namespace.ɵɵinject(i1__namespace.MomentDateAdapter), i0__namespace.ɵɵinject(i1__namespace$1.TranslateService)); }, token: DateFormatPipe, providedIn: "root" });
|
|
@@ -2766,10 +2772,10 @@
|
|
|
2766
2772
|
this.toDuration = toDuration;
|
|
2767
2773
|
}
|
|
2768
2774
|
DateUtils.min = function (date1, date2) {
|
|
2769
|
-
return date1 && date2
|
|
2775
|
+
return date1 && (!date2 || date1.isSameOrBefore(date2)) ? date1 : date2;
|
|
2770
2776
|
};
|
|
2771
2777
|
DateUtils.max = function (date1, date2) {
|
|
2772
|
-
return
|
|
2778
|
+
return date1 && (!date2 || date1.isSameOrAfter(date2)) ? date1 : date2;
|
|
2773
2779
|
};
|
|
2774
2780
|
DateUtils.equals = function (date1, date2) {
|
|
2775
2781
|
return DateUtils.isSame(date1, date2);
|