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

173
Vistas
How to get a ISO 8601 string like how Moment formats it with the native API?

If I run...

moment().format();

I get back 2022-05-25T16:47:05-04:00

But if I use the native browser Date API toISOString() it's not quite the same as Moment...

new Date(Date.now()).toISOString()

This comes back as 2022-05-25T20:47:05.698Z

How can I get the Date API to return the ISO string in the same format that moment defaults to? The documentation for both says it uses ISO 1806, but yet they are slightly different.

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