← All demos

Business Day Calculator

Count working days in a range, or add N business days to a start date. Useful for SLA calculations, delivery dates, and invoice due dates.

 
GET https://mycal-api.huijun00100101.workers.dev/v1/business-days?start=2026-03-01&end=2026-03-31&state=selangor

Two modes

  • Count days — returns the number of business days (non-weekend, non-holiday) between two dates, plus a breakdown of how many of each.
  • Add days — returns the date N business days after (or before, with a negative number) the start date.

State-awareness

The calculator respects each state's weekend configuration. A range that includes Friday March 20 2026 counts it as non-working in Kedah but working in Selangor. The API handles Johor's historical Fri–Sat → Sat–Sun transition (2014–2024) automatically.