Add Business Days
time.add_business_days
Overview
Adds a signed number of business days to an ISO local date. The weekend is whatever the caller declares and holidays are supplied explicitly — no national calendar is bundled. When the start date is not itself a business day, 'rolling' decides what happens before counting begins: 'forward' (default) moves to the next business day, 'backward' to the previous, and 'none' counts from the non-business start; the date actually counted from is reported as effectiveStartDate. Negative and zero day counts are supported and defined. Shares one calendar implementation with time.business_days_between, so adding n days and counting back always yields n.
"Three working days from Friday" has several defensible answers — we make your weekend definition, holiday list, and rolling convention explicit and report which one we applied.
Reliability
Same date, same rules, same answer — we read no clock, no locale and no zone data, and we bundle no national holidays, so a working calendar is only ever what you send. The counting shares one implementation with time.business_days_between, so adding n business days and counting back with inclusive start returns n for every weekend and holiday set. DAYS_MAGNITUDE_TOO_LARGE — trigger: the days value is further than 10000 business days from zero in either direction; retryable: no, the same number always fails; next: move in stages, feeding each resultDate in as the next startDate, or check whether the figure is really calendar days rather than working days. WEEKEND_DEFINITION_INVALID — trigger: weekendDays names all seven days, which leaves no working day to land on; retryable: no; next: leave at least one day out of the weekend list, or send an empty array if every day is a working day.
Context footprint
One call replaces a day-stepping loop and returns eight scalar fields, including the accounting for what was skipped. A successful call costs 1 execution credit.
When to use it
When you compute a due date, deadline, or settlement date in working days and you supply the calendar rules.
Do not use for plain calendar-day arithmetic, financial roll conventions (modified following), or when you need a built-in national holiday calendar.
Scope
Non-goals
- Does not bundle national or regional holiday calendars — holidays are supplied
- Does not apply month-end, quarter-end, or modified-following financial conventions
- Does not handle time zones or working hours
- Does not read the system clock
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
What this means
This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response does not contain submitted content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| startDate | string | Yes | Local date to count from. |
| days | integer | Yes | Signed business-day movement. |
| weekendDays | array | No | From 0 through 7 excluded weekdays; omit it for Saturday and Sunday. |
| holidays | array | No | From 0 through the published holiday cap of explicit non-working dates; omit it for none. |
| rolling | string | No | Non-business start rule; omit it for forward. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| resultDate | string | Yes | Resulting local date. |
| effectiveStartDate | string | Yes | Post-roll counting start. |
| skippedWeekendDays | integer | Yes | Skipped weekend-day count. |
| skippedHolidayDays | integer | Yes | Skipped non-weekend holiday count. |
| rolling | string | Yes | Applied rolling rule. |
| resultIsBusinessDay | boolean | Yes | Whether the resulting date is a business day. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"time.add_business_days","input":{"startDate":"2026-03-13","days":3,"holidays":["2026-03-16"]}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("time.add_business_days", {"holidays":["2026-03-16"],"startDate":"2026-03-13","days":3});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
| DAYS_MAGNITUDE_TOO_LARGE | 429 | No | A size, quota, rate, or time limit was exceeded. |
| WEEKEND_DEFINITION_INVALID | 400 | No | The request payload failed this skill's input validation. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not bundle national or regional holiday calendars — holidays are supplied
- Does not apply month-end, quarter-end, or modified-following financial conventions
- Does not handle time zones or working hours
- Does not read the system clock
- Adding calendar days (plain date arithmetic does that)
- Financial roll conventions such as modified following
- Anything that needs a built-in public-holiday calendar
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "time.add_business_days",
"input": {
"holidays": [
"2026-03-16"
],
"startDate": "2026-03-13",
"days": 3
}
}Examples
Three working days from a Friday, over a holiday Monday
{
"holidays": [
"2026-03-16"
],
"startDate": "2026-03-13",
"days": 3
}{
"resultDate": "2026-03-19",
"rolling": "forward",
"skippedWeekendDays": 2,
"skippedHolidayDays": 1,
"resultIsBusinessDay": true,
"effectiveStartDate": "2026-03-13"
}Zero days from a Saturday rolls to the next business day
{
"days": 0,
"startDate": "2026-03-14"
}{
"resultDate": "2026-03-16",
"rolling": "forward",
"skippedWeekendDays": 0,
"skippedHolidayDays": 0,
"resultIsBusinessDay": true,
"effectiveStartDate": "2026-03-16"
}Recommended use cases
- Compute a due date that is expressed in working days
- Find the next business day after a weekend or a holiday
- Step a settlement date backwards by a fixed number of working days
Avoid for
- Adding calendar days (plain date arithmetic does that)
- Financial roll conventions such as modified following
- Anything that needs a built-in public-holiday calendar
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.