bizdays
v0.2.0Verified business-day math for AI agents: holidays + per-country weekends, not guesses.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
add_business_days
USE THIS to compute a deadline or settlement date instead of counting on your fingers — never guess what date is N working days away. Adds (or subtracts, if N is negative) business days to a start date, skipping that country's weekends AND its public holidays. Weekends are country-correct (e.g. Friday/Saturday in Saudi Arabia, Saturday/Sunday in the UAE) and only real public holidays are skipped — not observances like Valentine's Day. Returns the result date, its weekday, and exactly which weekends/holidays were skipped.
| Parameter | Type | Description |
|---|---|---|
country * | string | ISO 3166-1 alpha-2 country code, e.g. US, GB, AE, SA, ZA. |
days * | integer | Business days to add; negative subtracts. |
start * | string | Start date, YYYY-MM-DD. |
extraHolidays | array | Optional extra non-working dates (YYYY-MM-DD), e.g. a company shutdown day. |
count_business_days
USE THIS to count working days between two dates instead of estimating — LLMs routinely miscount because they forget holidays or a country's weekend rule. Counts business days from start to end (both endpoints included by default), excluding that country's weekends and public holidays. Returns the count plus a breakdown of weekend days and the named holidays in range.
| Parameter | Type | Description |
|---|---|---|
country * | string | ISO 3166-1 alpha-2 country code, e.g. US, GB, AE, SA, ZA. |
end * | string | End date, YYYY-MM-DD. |
start * | string | Start date, YYYY-MM-DD. |
extraHolidays | array | Optional extra non-working dates (YYYY-MM-DD), e.g. a company shutdown day. |
inclusive | boolean | Include both endpoints (default true); false excludes the start date. |
is_business_day
USE THIS to check whether a specific date is a working day before scheduling on it — do not assume any weekday is open. Returns whether the date is a business day in the given country and, if not, the precise reason (weekend, public holiday with its name, or a custom holiday). Country-correct weekends and public-holidays-only.
| Parameter | Type | Description |
|---|---|---|
country * | string | ISO 3166-1 alpha-2 country code, e.g. US, GB, AE, SA, ZA. |
date * | string | Date, YYYY-MM-DD. |
extraHolidays | array | Optional extra non-working dates (YYYY-MM-DD), e.g. a company shutdown day. |
next_business_day
USE THIS to find the next working day after a date (e.g. when something falls due on a weekend or holiday) instead of guessing. Returns the first business day strictly after the given date for that country.
| Parameter | Type | Description |
|---|---|---|
country * | string | ISO 3166-1 alpha-2 country code, e.g. US, GB, AE, SA, ZA. |
date * | string | Date, YYYY-MM-DD. |
extraHolidays | array | Optional extra non-working dates (YYYY-MM-DD), e.g. a company shutdown day. |
previous_business_day
USE THIS to find the most recent working day before a date (e.g. the last open day before a holiday) instead of guessing. Returns the first business day strictly before the given date for that country.
| Parameter | Type | Description |
|---|---|---|
country * | string | ISO 3166-1 alpha-2 country code, e.g. US, GB, AE, SA, ZA. |
date * | string | Date, YYYY-MM-DD. |
extraHolidays | array | Optional extra non-working dates (YYYY-MM-DD), e.g. a company shutdown day. |
country_rule
USE THIS to see how bizdays treats a country before relying on a result — it returns the weekend days (with their source: a Qiniso override, CLDR, or the Sat/Sun default), whether a public-holiday calendar is applied, a confidence flag (verified vs unverified), and any caveats. Call this when a country looks unusual (Gulf states, Israel, Nepal) or when a result is surprising.
| Parameter | Type | Description |
|---|---|---|
country * | string | ISO 3166-1 alpha-2 country code, e.g. US, GB, AE, SA, ZA. |