Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Add Business Days

time.add_business_days

ProductionBounded custom (Class B)Deterministicstrictinstantv1.0.0
No network

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

Note
Adds a signed number of business days to a local date under a caller-declared weekend definition, holiday list, and rolling convention.

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

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

data-transformationmath

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input64 KB

How we handle your data

Sensitive input, safe output
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.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
startDatestringYesLocal date to count from.
daysintegerYesSigned business-day movement.
weekendDaysarrayNoFrom 0 through 7 excluded weekdays; omit it for Saturday and Sunday.
holidaysarrayNoFrom 0 through the published holiday cap of explicit non-working dates; omit it for none.
rollingstringNoNon-business start rule; omit it for forward.

Output schema

FieldTypeRequiredDescription
resultDatestringYesResulting local date.
effectiveStartDatestringYesPost-roll counting start.
skippedWeekendDaysintegerYesSkipped weekend-day count.
skippedHolidayDaysintegerYesSkipped non-weekend holiday count.
rollingstringYesApplied rolling rule.
resultIsBusinessDaybooleanYesWhether the resulting date is a business day.

API contract

POST /v1/execute
curl
curl -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"]}}'
Integrations
TypeScript SDK
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

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
DAYS_MAGNITUDE_TOO_LARGE429NoA size, quota, rate, or time limit was exceeded.
WEEKEND_DEFINITION_INVALID400NoThe request payload failed this skill's input validation.

Other limits

LimitValue
Recommended inline bytes32 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)

Request bodyjson
{
  "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

Inputjson
{
  "holidays": [
    "2026-03-16"
  ],
  "startDate": "2026-03-13",
  "days": 3
}
Expected outputjson
{
  "resultDate": "2026-03-19",
  "rolling": "forward",
  "skippedWeekendDays": 2,
  "skippedHolidayDays": 1,
  "resultIsBusinessDay": true,
  "effectiveStartDate": "2026-03-13"
}
Tip
Two weekend days and the Monday holiday are stepped over

Zero days from a Saturday rolls to the next business day

Inputjson
{
  "days": 0,
  "startDate": "2026-03-14"
}
Expected outputjson
{
  "resultDate": "2026-03-16",
  "rolling": "forward",
  "skippedWeekendDays": 0,
  "skippedHolidayDays": 0,
  "resultIsBusinessDay": true,
  "effectiveStartDate": "2026-03-16"
}
Tip
With rolling 'none' the same call would return the Saturday unchanged
  • 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

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.

Tags

transformationdate-timemath