I need to be able to parse a date regardless of language into Moment, and I want to be able to do this with a single mapping that I can get from i18n:
moment(stringDate, i18n.t(DATE_FORMAT_KEY))
However, I have the following date:
"31 de ene. de 2022"
The date format would be "dd de mmm. de YYY" if I understand everything correctly, this doesn't seem to be working. The two possible failure points I could see are the inclusion of "de" in the date or the fact that "ene." is used to abbreviate "enero" for january.
If anyone has any help, I would appreciate it. To emphasize, I need a workflow that would work for any date, regardless of language used if the month is abbreviated, and ideally should be able to do everything by just changing my date format mapping for each language.