Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

172
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda