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

168
Views
La fecha y la hora de la extensión de Chrome no se actualizan cuando la extensión funciona

Estoy haciendo extensión. Obtengo fecha y hora con "getDateAndTime();" función.

 function getDateAndTime() { return (date.getDate()<10? "0" : "") + date.getDate() + " " + months_tr[date.getMonth()] + " " + date.getFullYear() + " - " + (date.getHours()<10? "0" : "") + date.getHours() + "." + (date.getMinutes()<10? "0" : "") + date.getMinutes(); }

La primera vez que se ejecuta la extensión, la fecha y la hora se actualizan, pero luego, cuando se vuelve a llamar a la función, los datos no se actualizan.

¿Cómo puedo mantener actualizada la fecha y la hora?

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

0

Tiene una variable de fecha que se declaró fuera de la función. Se declara una vez, por lo que seguirá siendo el mismo.

Supongo que quieres agregar:

 function getDateAndTime() { const date = new Date(); .... }

Significa que la fecha se actualiza para que todos llamen a esta función.

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!