Open JapNolt opened 1 year ago
Generally a good idea, however a few things to keep in mind:
startOf('week')
in Luxon means Monday, no matter the locale. As such there would need to be a separate way to get the locale dependent start of the week. This is also because sometimes you do not want the locale dependent start of the week.numberingSystem
or outputCalendar
.en-US-u-fw-wed
to specify Wednesday as the start of the week), however this seems to be ignored by the Intl.Locale
API, it always provides the data of the locale. Luxon doesn't have a BCP-47 parser, but if a DateTime's locale contains this tag, we probably want to honor it.
It appears like Intl.Locale.weekInfo is implemented in most browsers. Can this be used in luxon to determine the correct start of week?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/weekInfo