time_working_days_calculator
Count business days between two dates or add/subtract working days, excluding weekends and optional holidays. Use for project timelines or date arithmetic without time dependency.
Instructions
Working Days Calculator. Pure deterministic proleptic-Gregorian working-day math over UTC, with no clock/now dependency — every date is supplied by the caller. operation "countBetween" counts Mon-Fri working days in the inclusive range [from, to], optionally excluding a holiday list, and returns the breakdown (total calendar days, weekend days, weekday holidays counted, working days, holidays that fell in range). operation "addWorkingDays" shifts a base date by a signed number of working days, skipping Saturdays, Sundays, and listed holidays, and returns the resulting date plus how many weekends/holidays were stepped over. Use this for business-day counts or weekend/holiday-skipping date arithmetic; use time_date_difference for plain calendar diffs or business-day counts without holiday exclusion, and time_date_calculator for weekend-skipping arithmetic by years/months/days. Read-only, non-destructive, idempotent, offline-capable, rate-limited (60 req/min anonymous), no auth. Result is wrapped as operation pl
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | "countBetween": count working days between two dates (needs from* and to*). "addWorkingDays": shift a base date by working days (needs year/month/day and days). | |
| fromYear | No | Start-date year (proleptic Gregorian). Required when operation is countBetween. | |
| fromMonth | No | Start-date month 1-12. Required when operation is countBetween. | |
| fromDay | No | Start-date day 1-31; must be a real calendar date. Required when operation is countBetween. | |
| toYear | No | End-date year; must be on or after the from date. Required when operation is countBetween. | |
| toMonth | No | End-date month 1-12. Required when operation is countBetween. | |
| toDay | No | End-date day 1-31. Required when operation is countBetween. | |
| year | No | Base-date year. Required when operation is addWorkingDays. | |
| month | No | Base-date month 1-12. Required when operation is addWorkingDays. | |
| day | No | Base-date day 1-31; must be a real calendar date. Required when operation is addWorkingDays. | |
| days | No | Signed number of working days to add (positive) or subtract (negative); 0 returns the base date. Required when operation is addWorkingDays. | |
| holidays | No | Optional dates to treat as non-working days, in addition to weekends. Duplicates are deduped; each must be a real calendar date. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | No | The operation that was run, echoed back (countBetween or addWorkingDays). | |
| data | No | Result payload; shape depends on operation. |