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

101
Views
How do I parse with both Day of Week and Month in date-fns?

I have a string Mon Mar 28 00:00:00 EDT 2022 which I want to parse but it's not working

dateFns.parse(theDate, "eee MMM d HH:mm:ss X yyyy", null)

Getting

RangeError: The format string mustn't contain eee and MMM at the same time

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Well, you can try this:

dateFns.parse(theDate, "EEE MMM d HH:mm:ss X yyyy", new Date())

but this still wrong, the "EDT" string cause error, I've tried with "-04" instead, it works. So maybe you should try some way convert the "EDT, UTC,.." string to timezone format "-04" "+07"

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