Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

128
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda