@haiilo/catalyst 8.2.0 → 8.3.0

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.
@@ -2754,7 +2754,7 @@ function getFirstDayOfWeek(language) {
2754
2754
  }
2755
2755
  function daysForLocale(language, weekday = 'long') {
2756
2756
  const date = new Date();
2757
- const firstDayOfWeek = date.getUTCDate() - date.getUTCDay();
2757
+ const firstDayOfWeek = (date.getUTCDate() - date.getUTCDay() + 7) % 7;
2758
2758
  const format = new Intl.DateTimeFormat(language, { weekday }).format;
2759
2759
  return [...Array(7).keys()].map(day => format(date.setUTCDate(firstDayOfWeek + day)));
2760
2760
  }