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

427
Views
.setHours(0,0,0,0) con moment.js

¿Cuál es el equivalente más fácil de date.setHours(0,0,0,0) cuando se usa moment.js?

Básicamente, si necesito un new Date() con horas, minutos, segundos y milisegundos en cero.

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Comienzo del tiempo

 moment().startOf('day')
over 4 years ago · Santiago Trujillo Report

0

Supongamos que fecha es el objeto de momento que contiene la fecha con algunas horas y minutos.

Puede usar el siguiente código para restablecer horas, minutos y segundos a 0.

 date.utcOffset(0); date.set({ hour: 0, minute: 0, second: 0, millisecond: 0, });
over 4 years ago · Santiago Trujillo Report

0

para establecer el segundo, por ejemplo, en " 0 " time = moment().second(0);

over 4 years ago · Santiago Trujillo 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!