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

301
Views
Javascript: las fechas no se muestran en el mismo formato y toUTCString no funciona

Tengo que mostrar una fecha en formato UTC después de actualizar el año. tuve 2 problemas:

1 - el primero y el segundo "console.log" muestran formatos diferentes, a pesar de que tienen exactamente la misma lógica.

2- el método ".toUTCString()" no funciona

¿Alguien puede decirme por qué?

Gracias.

 let date = new Date(); date.setFullYear(2020); console.log(date); // 1- the next line does not display the same as the previous console.log(new Date().setFullYear(2020)); console.log(date.toUTCString()); // 2- toUTCString() does not work console.log(new Date().setFullYear(2020).toUTCString());

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!