Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

121
Views
JS Moment Parse International Dates With Foreign Language Labels

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.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!