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
Convert 'Jul' to 'July' with moment.js

I have this response Wed Jul 20 2022 00:00:00 GMT+0300 (Ora de vară a Europei de Est) and I need to convert Jul to July. Is any chance to do it with moment.js? If not, maybe simple way to convert it with vanilla JS.

about 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

This

moment(new Date("Wed Jul 20 2022 00:00:00 GMT+0300")).format('MMMM');

will return 'July';

You can find more there : https://momentjs.com/

about 4 years ago · Santiago Trujillo Relatório

0

JS Date objects now natively support locale methods for this sort of thing, which has the benefit of working for the whole world (which most regex-based or string-substitution based strategies for this type of problem will not):

let d = new Date("Wed Jul 20 2022 00:00:00 GMT+0300")

console.log(d.toLocaleString('default', { month: 'long' }))

about 4 years ago · Santiago Trujillo Relatório

0

You can get this using the format method of moment

  • Using MMMM you can get July

Check this out click here

moment().format('MMMM Do YYYY, h:mm:ss a');
about 4 years ago · Santiago Trujillo 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