Saltar al contenido
uencoder

Calcular business days between dates

Business day calculation excludes weekends y holidays. Aprender a calcular funcionando days, añadir/subtract business days, y handle holidays.

  1. 1

    Business day calculation: count days between two dates, excluding weekends (Saturday and Sunday) and holidays. Steps: (1) Count total days. (2) Subtract weekend days (floor(total / 7) * 2, plus partial week). (3) Subtract holidays that fall on weekdays. (4) Maintain a holiday calendar (varies by country/region — use a library like date-holidays).

  2. 2
    Calculadora de fechas →

    Calcular the date difference. This gives total calendar days. To get business days, subtract weekends and holidays. The tool handles date arithmetic (add/subtract days) — use it to iterate through dates and count business days, or use the formula approach for large ranges.

  3. 3
    Calculadora de diferencia de tiempo →

    Calcular the time difference between two dates. For business hours, calculate the overlap between the time range and business hours (e.g., 9 AM - 5 PM, Monday-Friday). This is more complex — handle lunch breaks, partial days, and timezone differences.

Preguntas frecuentes

How do I handle holidays?
Maintain a list of holiday dates for the relevant country/region. Use a library (date-holidays, @date/holidays-utils) that provides holiday data for 100+ countries. Holidays vary by year and region — Easter is computed (not fixed), some holidays are observed on the nearest weekday. Update the holiday list annually.
What about non-standard work weeks?
Some regions have non-standard weekends: Friday-Saturday (some Middle Eastern countries), Sunday only (some countries). Customize the weekend days in your calculation. For shift work (24/7 operations), every day is a business day — only subtract holidays. For part-time schedules, define the working days per employee.

Herramientas relacionadas