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

106
Views
Función para agregar más días a una fecha

No sé mucho sobre la nueva función Date() y quería una forma de agregar días a una fecha. tengo

 this.formGeral.patchValue({data:new Date().toISOString().substring(0, 10)});

Me gustaría agregar 5 días hábiles más a esta fecha (no podría contar el sábado o el domingo) ¿cómo podría cambiar este valor de parche?

Vi que habría este ejemplo, pero aquí también devuelve los días hábiles https://pt.stackoverflow.com/questions/9281/fun%c3%a7%c3%a3o-para-adicionar-mais-horas-ou -dias-a-uma-datos

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Aquí está el código

 const dt = new Date(); dt.setDate(dt.getDate() + 5); // adding 5 more days this.formGeral.patchValue({data:dt});

También puede usar momentjs https://momentjs.com/

Ejemplo- moment().add(1, 'days'); //añade 1 día a la fecha actual

about 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!