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
La resta de días en DateObjects en JavaScript no funciona (como se esperaba)

¿Puede alguien decirme por qué la consola registra hasta la fecha del lunes 14 de marzo de 2022 aquí cuando debería iniciar sesión hasta la fecha del jueves 14 de diciembre de 2021?

 let _untilDate = new Date(); // Mon Mar 14 2022 let _fromDate = new Date(); // Mon Mar 14 2022 _fromDate.setDate(_untilDate.getDate() - 89); ///_fromDate should now be Wed Dec 15 2021 _untilDate.setDate(_fromDate.getDate() - 1); ///_untilDate should now be Thu Dec 14 2021 console.log(`untilDate: ${_untilDate.toDateString()}`); //actually logs untilDate Mon Mar 14 2022 console.log(`fromDate: ${_fromDate.toDateString()}`);

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!