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

417
Visualizações
Value provided is not in a recognized RFC2822 or ISO format - Vue js

I am having a problem when using this library with vue.js https://www.npmjs.com/package/vue-moment

When I try to pass date in a table, I get this warning:

Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.

This is my code:

<small>{{ item.created_at | moment("from", "now", true) }}</small>

And this is how my codes without any filtering:

2021-10-11 11:17:03

I have tried this:

   <small>{{ [item.created_at,"YYYY-MM-DD, h:mm:ss a"] | moment("from", "now", true) }}</small>

But now get this:

app.js Could not build a valid `moment` object from input.

Any idea how to fix this warning in vue js please?

Thank you

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Both of your approaches, as you warning tells you, do mismatch RFC2822/ISO8601.

RFC2822 would look like this:

01 Jun 2020 14:11:32 -0700

ISO8601 would look like this:

2021-10-10T22:00:00.000Z

If you need to get the date format of vue-moment into ISO8601 format, you can do this in a short function like this:

showNewDate(date) {
   return new Date(Date.parse(date))
}

If you pass 2021-10-11 11:17:03 to this function it will give you 2021-10-11T09:17:03.000Z which is the date +- your timezone, in my example case minus two hours.

about 4 years ago · Juan Pablo Isaza Relatório
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