Closed weklund closed 5 months ago
weekNumber
and associated properties are always based on the ISO week date. Settings.defaultWeekSettings
and the locale only influence localeWeekNumber
, etc.
Ah I see, so using localeWeekNumber
in my case is ok because this always runs on the user's local device. All tests pass now.
Thank you!
Describe the bug I'm writing test cases to ensure given a particular DateTime, Luxon is giving me the uncorrect weekNumber to support an Alfred<->Obsidian plugin I'm working on.
Here's some screenshots that I can quickly doublecheck the date with the week number:
Appears only test cases that fall on Sundays are incorrect, specifically getting 1 less that I'm expecting.
To Reproduce Please share a minimal code example that triggers the problem:
Actual vs Expected behavior A clear and concise description of what you expected to happen.
Given that I've set the first day of the week to Sunday (via
firstDay: 7
in Settings), these test cases with days on Sunday, I'm expecting weekNumber to be +1 more than I'm actually seeing.Desktop (please complete the following information):
Additional context Add any other context about the problem here.