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

182
Views
How can I round seconds to 0 with dayJS

I am creating an app which asks the users for 2 dates, then it calculates the time between them dates.

But the dates have seconds in them so instead of 90 minutes I am getting 89 minutes.

So I can convert this:

startTime: Sat Apr 09 2022 09:00:39 GMT+0100 (Irish Standard Time)

Into this:

startTime: Sat Apr 09 2022 09:00:00 GMT+0100 (Irish Standard Time)

I would preferably do this with DayJS

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

0

I came up with a solution with the help of James!

values.startTime = dayjs(time[0].setUTCSeconds(0)).toDate();

Thank you!

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!