Time and Date API: Count business days
Counts weekdays between two dates, excluding nationwide public holidays or, optionally, public holidays in a state or province, from Time and Date's published holiday calendar.
Unofficial. Not affiliated with or endorsed by Time and Date.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Region optional
region State or province for regional public holidays, such as California; omit for nationwide holidays only.
California
Default
.- Country, required
country Country name or two-letter code, such as United States or US.
US
- End Date, required
end_date Last date to count (YYYY-MM-DD), such as 2026-11-30.
2026-11-30
- Start Date, required
start_date First date to count (YYYY-MM-DD), such as 2026-11-23.
2026-11-23
- Include End Date optional
include_end_date Whether to count the end date, for example true.
true
True or false. Default
true.
Input as JSON
{ "region": "California", "country": "US", "end_date": "2026-11-30", "start_date": "2026-11-23", "include_end_date": true}Output
{ "region": "California", "country": "United States", "page_link": "https://www.timeanddate.com/holidays/us/2026" , "weekend_days": 2, "business_days": 4, "holidays_skipped": [ { "date": "2026-11-26", "name": "Thanksgiving Day", "page_link": "https://www.timeanddate.com/holidays/us/thanksgiving-day" }, { "date": "2026-11-27", "name": "Day After Thanksgiving", "page_link": "https://www.timeanddate.com/holidays/us/day-after-thanksgiving" } ], "total_calendar_days": 8}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"timeanddate.com/count_business_days","input":{"region":"California","country":"US","end_date":"2026-11-30","start_date":"2026-11-23","include_end_date":true}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "timeanddate.com/count_business_days" , "input": { "region": "California", "country": "US", "end_date": "2026-11-30", "start_date": "2026-11-23", "include_end_date": True }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "timeanddate.com/count_business_days" , "input": { "region": "California", "country": "US", "end_date": "2026-11-30", "start_date": "2026-11-23", "include_end_date": true } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run timeanddate.com/count_business_days# with {"region":"California","country":"US","end_date":"2026-11-30","start_date":"2026-11-23","include_end_date":true}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "start_date", "end_date", "country" ], "properties": { "region": { "type": "string", "default": "", "description": "State or province for regional public holidays, such as California; omit for nationwide holidays only." }, "country": { "type": "string", "description": "Country name or two-letter code, such as United States or US." }, "end_date": { "type": "string", "description": "Last date to count (YYYY-MM-DD), such as 2026-11-30." }, "start_date": { "type": "string", "description": "First date to count (YYYY-MM-DD), such as 2026-11-23." }, "include_end_date": { "type": "boolean", "default": true, "description": "Whether to count the end date, for example true." } }}Output schema
{ "type": "object", "required": [ "country", "region", "total_calendar_days", "weekend_days", "holidays_skipped", "business_days", "page_link" ], "properties": { "region": { "type": [ "string", "null" ], "description": "Region used for regional holidays, or null for national holidays only." }, "country": { "type": "string", "description": "Country used for the calculation." }, "page_link": { "type": "string", "description": "Country holiday calendar used to count the dates." }, "weekend_days": { "type": "integer", "description": "Saturday and Sunday dates in the selected range." }, "business_days": { "type": "integer", "description": "Calendar days minus weekends and distinct weekday holiday dates." }, "holidays_skipped": { "type": "array", "items": { "type": "object", "required": [ "date", "name", "page_link" ], "properties": { "date": { "type": "string", "format": "date" }, "name": { "type": "string" }, "page_link": { "type": "string" } }, "additionalProperties": false }, "description": "Public holidays on weekdays that were skipped." }, "total_calendar_days": { "type": "integer", "description": "Number of calendar days in the selected range." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
timeanddate.com/count_business_days- Returns
- calendar days, weekend days, skipped holidays, business days, holiday calendar link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method timeanddate.com/count_business_days with the inputs above.
Ask your agent
- How many working days are there between March 2, 2026 and April 17, 2026 in Germany, not counting public holidays?
- Using timeanddate.com, count the business days from 2026-12-01 to 2026-12-31 in Canada, including Ontario provincial holidays.
- I need the number of weekdays between June 15 and August 28, 2026 in Australia (New South Wales), minus public holidays — also show how many weekend days and which holidays were skipped.
- Check Time and Date for how many working days fall between 2026-11-23 and 2026-11-30 in the US, excluding the end date.
- Our contract says delivery within business days from January 5, 2027 to February 19, 2027 in the UK — how many is that once bank holidays are excluded?
See more
All Time and Date methodsConverts a meeting time in one city to local times in other cities, with time zones and 09:00-17:00 working-hours status. Supports dates from 1970 to 2030; ambiguous clock-change times use the first occurrence.
timeanddate.com/convert_time_between_citiesGets daily sunrise, sunset, solar noon, day length and civil twilight for a place from Time and Date, for one or more consecutive days. Times are local with UTC offset; days without sunrise or sunset are marked.
timeanddate.com/get_sunrise_and_sunsetGets the current local time, time zone, and next daylight saving change for a city listed on Time and Date. Add a state or country to distinguish cities with the same name.
timeanddate.com/get_time_in_cityLists scheduled and recent economic releases from the Investing.com economic calendar for a date range (up to 31 days, default this week), countries and importance, with actual, forecast and previous values as displayed, in the requested time zone.
investing.com/get_economic_calendarChecks whether a date is a public holiday or weekend in a country. By default only nationwide holidays count; give a region to include holidays observed there.
date.nager.at/check_public_holidayLists near-Earth asteroids that pass Earth between two UTC dates within a chosen distance, with approach times, size ranges, speed and hazard status.
nasa.gov/list_near_earth_asteroidsGets earnings reports for a date range, or the upcoming reports and up to four previous reports for one company.
finance.yahoo.com/get_earnings_calendarLists GOV.UK bank holidays for a UK region and year, including substitute days and notes, plus the next upcoming holiday. Years GOV.UK does not publish return an empty list and the published years.
gov.uk/list_bank_holidays