Description
Describe the bug
If you use DateTime.expandFormat("DDD", { locale: "en" })
you get MMMM d, yyyyy
and that's correct (although why 5 y
instead of 4?).
But when you use it with the locale es
like DateTime.expandFormat("DDD", { locale: "es" })
you get d de abril de 2019
and this is wrong. Is only allowing to specify the day, the rest month and year are fixed to the current month and the year 2019.
SoDateTime.fromFormat("2 de abril de 2019", "DDD).isValid
will be true, but changing the month or year will return invalid since that part is fixed internally on the library.
To Reproduce
DateTime.expandFormat("DDD", { locale: "es" })
DateTime.fromFormat("2 de abril de 2024", "DDD")
Actual vs Expected behavior
DateTime.expandFormat("DDD", { locale: "es" })
should return d de MMMM de yyyy
DateTime.fromFormat("2 de abril de 2024", "DDD").isValid
should return true
Desktop (please complete the following information):
- Mac
- Chrome, Safari, anything
- Luxon version 3.4.4
- America/New_York