• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Pruebas Online
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

72
Vistas
How to exclude weekends Saturday and Sunday with adding extaDay

Below logic works for excluding saturday and sunday, remaining dates are pushing to the aray. Now I'm trying to add some extra day, here also I need to exclude saturday and sunday, but its includes saturday and sunday as well...Is there any suggestion to excludes weekends for extra day values. Here is the sample code,

const extraday:number=3;
for (let i = 1 + extraday; i <= 15 + extraday; i++) {
  const dt = new Date();
  dt.setDate(dt.getDate() + i);
  if (dt.getDay() !== 6 && dt.getDay() !== 0) {// excluding weekends
    Array.push(); //
  }
}
almost 3 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda