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

130
Views
Adding 3 days into Date.now()

I have this:

 const days = Math.floor(Date.now() + 3 * (3600 * 1000 * 24))

Is this correct for 3 days??? I need it in milliseconds format

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

0

Try this:

var date = new Date(); // Now
date.setDate(date.getDate() + 3); // Set now + 3 days as the new date
console.log(date);

about 4 years ago · Juan Pablo Isaza Report

0

it will be simpler like this:

const now = new Date();
const threeDayLater = Math.floor(new Date(now.setDate(now.getDate() + 3)).getTime() / 1000)
about 4 years ago · Juan Pablo Isaza Report

0

You can create a new Date out of days, and check it yourself:

const days = Math.floor(Date.now() + 3 * (3600 * 1000 * 24))
console.log(new Date(days));

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!