Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

164
Views
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 answers
Answer question

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 Report

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!