Use the Locale on date-fns functions
tomchentw opened this issue · comments
Tom Chen commented
Issue
#38 is a good demonstration for this bug. If I change locale
to the one that has Monday as their first day of the week, the calendar will not respect that. Eg. Italian locale
https://github.com/date-fns/date-fns/blob/v2.25.0/src/locale/it/index.js
Has an options.weekStartsOn = 1
. With #38, it gives:
Where Dom (domenica) is Sunday in Italian and Lun (lunedì) is Monday in Italina
Solution
Whenever date-fns functions are used, they should given the locale
object.
https://date-fns.org/v2.28.0/docs/Locale
I will see if I could submit a PR for this. Thank you