@sumaris-net/ngx-components 1.15.4 → 1.15.5
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 +14 -0
- 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 +15 -1
- package/esm2015/src/app/shared/material/datetime/material.date.js +1 -1
- package/esm2015/src/app/shared/material/datetime/material.datetime.js +1 -1
- package/fesm2015/sumaris-net.ngx-components.js +14 -0
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/dates.d.ts +7 -0
|
@@ -2616,6 +2616,20 @@
|
|
|
2616
2616
|
.tz(timezone, keepLocalTime)
|
|
2617
2617
|
.startOf('day');
|
|
2618
2618
|
};
|
|
2619
|
+
/**
|
|
2620
|
+
* Test if a date is on the given day of week
|
|
2621
|
+
* @param date
|
|
2622
|
+
* @param weekday
|
|
2623
|
+
* @param timezone
|
|
2624
|
+
*/
|
|
2625
|
+
DateUtils.isAtDay = function (date, weekday, timezone) {
|
|
2626
|
+
date = date && fromDateISOString(date);
|
|
2627
|
+
if (!date)
|
|
2628
|
+
return null;
|
|
2629
|
+
if (timezone)
|
|
2630
|
+
date = date.clone().tz(timezone).startOf('day');
|
|
2631
|
+
return date.day() === weekday;
|
|
2632
|
+
};
|
|
2619
2633
|
return DateUtils;
|
|
2620
2634
|
}());
|
|
2621
2635
|
function toDateISOString(value) {
|