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

92
Views
calculation between two time slots javascript

calculation between two time slots, I retrieve a time from my database example: 11:50 and the current time is 18:50. How to calculate interval between the two schedules? thank you for help.

const currentTime = new Date();
    const timeMinutes = currentTime.getMinutes()
    
    if(timeMinutes < 10){
        var timeMinute = '0' + timeMinutes
    }else{
        timeMinute = timeMinutes
    }
const heureCommande = currentTime.getHours() + ":" + timeMinute
    console.log(heureCommande)
console.log(heureCommande - 18:50)
about 4 years ago · Juan Pablo Isaza
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!