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

158
Views
La fecha del calendario se muestra un día antes

Esto está configurado en CodePen y está escrito con JavaScript y HTML. ¿Cómo puedo corregir el código para que solo haya una variable de fecha y hora y muestre la fecha del calendario de hoy? https://codepen.io/Artomic/pen/LYLXWpb

 const currentDate = new Date(); const dateTime = currentDate.getDate() + "/" + (currentDate.getMonth() + 1) + "/" + currentDate.getFullYear() + " " + currentDate.getHours() + ":" + currentDate.getMinutes() var months = ['January','February','March','April','May','June','July', 'August','September','October','November','December']; var tomorrow = new Date(); tomorrow.setTime(tomorrow.getTime() + (1000*3600*24)); document.getElementById("spanDate").innerHTML = months[tomorrow.getMonth()] + " " + tomorrow.getDate()+ ", " + tomorrow.getFullYear(); const dateTimeB = new Date().toLocaleTimeString('en-US', { hour12: false, hour: "numeric", minute: "numeric" }); console.log(dateTimeB) document.getElementById("dateTimeB").innerHTML=dateTimeB HTML <span id="spanDate"></span> <br> <span id= "dateTimeB"</span> <span id="dateTime"></span>
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!