Skip to main content

next_workday

Return the next workday date from today, skipping weekends and public holidays in a given country. A workday is defined as a Monday through Friday that is not a public holiday.

Holiday data is sourced from the Nager.Date public API, which covers 115+ countries.

Parameters​

ParameterTypeRequiredDescription
country_codestringYesISO 3166-1 alpha-2 country code used to look up public holidays, e.g. "US", "DE", or "FR".
timezonestringNoIANA timezone name used to determine what "today" is, e.g. "America/New_York" or "Europe/Berlin". When omitted, UTC is used.
global_onlybooleanNoWhen true, only nationwide holidays count as non-working days; regional holidays are ignored. Defaults to false.

Response​

FieldTypeDescription
datestringThe next workday as an ISO 8601 date string, e.g. "2026-04-14".
weekdaystringFull English weekday name of the next workday, e.g. "Tuesday".
days_from_todayintegerNumber of calendar days from today until the next workday. 1 means tomorrow, 2 means the day after, etc.
holidays_skippedarray of stringNames of public holidays that were skipped to reach the next workday. Empty when only weekends were skipped (or none at all).

Examples​

Regular case — next workday is tomorrow​

{
"country_code": "US"
}

Result (run on a Monday):

{
"date": "2026-04-14",
"weekday": "Tuesday",
"days_from_today": 1,
"holidays_skipped": []
}

Friday — next workday is the following Monday​

{
"country_code": "DE"
}

Result (run on a Friday):

{
"date": "2026-04-20",
"weekday": "Monday",
"days_from_today": 3,
"holidays_skipped": []
}

Public holiday skipped​

{
"country_code": "US"
}

Result (run on Thursday 2026-12-24 — Christmas Eve):

{
"date": "2026-12-28",
"weekday": "Monday",
"days_from_today": 4,
"holidays_skipped": ["Christmas Day"]
}

With timezone​

{
"country_code": "JP",
"timezone": "Asia/Tokyo"
}

Result (run on 2026-04-14, a Tuesday in Tokyo):

{
"date": "2026-04-15",
"weekday": "Wednesday",
"days_from_today": 1,
"holidays_skipped": []
}

Errors​

Each failure carries a precise code in the response. Argument-schema and server errors are JSON-RPC protocol errors; a rejected value is returned as a tool result with isError: true (so the agent can read the code and self-correct).

CodeWhenDelivered as
invalid_argumentsAn argument is missing or the wrong type.protocol error (invalid_params)
invalid_countrycountry_code is not supported by the holiday data provider.tool error (isError)
invalid_timezonetimezone is not a valid IANA timezone name.tool error (isError)
internal_errorAn unexpected server error.protocol error (internal_error)

Notes​

  • "Today" is resolved in the given timezone (or UTC if omitted). This matters when it is late evening in one timezone and already the next calendar day in another.
  • The global_only flag mirrors the same parameter on is_workday, public_holidays_list, and public_holidays_in_range. Set it to true if you want to treat only nationwide holidays as non-working days and ignore state- or region-level holidays.
  • The tool looks up to 14 days ahead. This is sufficient for any real-world run of consecutive public holidays.
  • Supported country codes include US, GB, DE, FR, JP, AU, CA, BR, and 100+ others. See Nager.Date available countries for the full list.