luxon icon indicating copy to clipboard operation
luxon copied to clipboard

Settings.defaultWeekSettings not working

Open aronsuarez opened this issue 1 year ago • 11 comments

Describe the bug Settings.defaultWeekSettings has no effect at all, the weeks are starting still at Sunday

To Reproduce Settings.defaultLocale = 'de-CH' Settings.defaultWeekSettings = { firstDay: 1, minimalDays: 1, weekend: [6, 7] }

Actual vs Expected behavior I want to set default start day of the week to monday, currently is nothing changed when i set the Settings.defaultWeekSettings

Desktop (please complete the following information):

  • OS: Android, iOS, MacOS (all latest)
  • Browser Chrome and Safari Latest
  • Luxon version 3.4.4
  • Your timezone Europe/Zurich

Additional context Add any other context about the problem here.

aronsuarez avatar Jan 14 '24 20:01 aronsuarez

In my tests this works correctly. Are you setting useLocaleWeeks when using startOf? startOf('week') on its own always uses the ISO week year.

diesieben07 avatar Jan 15 '24 07:01 diesieben07