@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.
@@ -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) {