Business Days in 249 Countries: 862 Holiday Calendars, Down to the Region
"How many business days until the invoice is due?" sounds like a one-liner until your customers are in Riyadh, Strasbourg, Mumbai and Zürich. Different public holidays, different regional holidays, and in a lot of the world, a different weekend.
As of today, the TimeLogic API handles all of it. Business-day counting on /v1/time/diff and /v1/time/elapsed supports 862 holiday calendars:
- 249 national calendars, one for every country and territory with an ISO 3166-1 code we support
- 613 subdivision calendars in 35 countries: states, provinces, cantons, regions and overseas departments
- holiday data for every year from 1900 to 2100
One parameter, any calendar
Add business_days=true and pick a calendar with holiday_country:
curl "https://api.timelogicapi.com/v1/time/diff?from=iso=2026-01-02T00:00:00Z&to=iso=2026-04-30T00:00:00Z&business_days=true&holiday_country=FR" \
-H "Authorization: Bearer $TIMELOGIC_API_KEY"
{
"seconds": 10195200,
"minutes": 169920,
"hours": 2832,
"days": 118,
"direction": "forward",
"human": "2832 hours, 0 minutes, 0 seconds",
"from": { "unix_ms": 1767312000000 },
"to": { "unix_ms": 1777507200000 },
"business_days": 83
}
The start date counts and the end date does not ([from, to)), and public holidays of the chosen calendar are skipped.
Subdivision codes
Regional holidays matter. Good Friday is a working day in most of France and a public holiday in Alsace and Moselle. Swiss cantons and Indian states each set holidays of their own. Each region is a calendar of its own, addressed with its ISO 3166-2 code:
| Code | Calendar |
|---|---|
FR-6AE | France, Alsace |
CH-ZH | Switzerland, Zürich |
IN-MH | India, Maharashtra |
NZ-CAN | New Zealand, Canterbury |
US-CA | United States, California |
Two equivalent ways to ask for one:
holiday_country=CH-ZH
holiday_country=CH&holiday_subdivision=ZH
Codes are case-insensitive (ch-zh works), but digits and leading zeros are part of the code: FR-971 is Guadeloupe and FI-01 is Åland, while FI-1 is not a calendar. A subdivision calendar includes its country's national holidays and uses the country's weekend.
Same range, six calendars
January 2 to April 30, 2026, counted against six calendars:
holiday_country | business_days |
|---|---|
FR | 83 |
FR-6AE (Good Friday is a holiday in Alsace) | 82 |
CH-ZH | 82 |
IN-MH | 76 |
NZ-CAN | 79 |
SA (Friday–Saturday weekend) | 79 |
Same dates, up to a week's difference. That gap is the bug you no longer have to write.
Weekends are part of the calendar
Every calendar uses its country's working week:
- Saturday + Sunday: 221 countries
- Friday + Saturday: 18 countries, including
SA,QA,KW,BH,OM,EG,ILandJO - Sunday only: 8, including
HKandVE - Friday only:
IR - Friday + Sunday:
BN(Brunei)
You don't pass a weekend parameter. Pick the calendar and the weekend comes with it. Without holiday_country, the weekend is Saturday + Sunday.
The current weekend is applied to every year: the API does not model historical weekend changes, such as Saudi Arabia moving from Thursday–Friday to Friday–Saturday in 2013.
The whole list, as JSON
Every country, its weekend and all of its subdivision codes are published at /content/holiday-calendars.json. It's a static file, no API key needed, so you can build a calendar picker or validate codes before you call the API:
curl -s https://timelogicapi.com/content/holiday-calendars.json \
| jq -r '.countries[] | select(.code == "FR") | .subdivisions[] | "FR-\(.code) \(.name)"'
Weekdays in weekend_days are numbered 0 (Sunday) to 6 (Saturday). To list every country with a Friday–Saturday weekend:
curl -s https://timelogicapi.com/content/holiday-calendars.json \
| jq -r '.countries[] | select(.weekend_days == [5, 6]) | .code' | paste -sd' '
The same table is on the docs page under Holiday calendars, along with the coverage notes.
Clear errors for unknown codes
A code that isn't a calendar gets a 400 INVALID_PARAMETER that names the problem:
{
"error": {
"code": "INVALID_PARAMETER",
"message": "Unknown holiday_subdivision '1' for country FI.",
"details": { "holiday_country": "FI", "holiday_subdivision": "1" }
},
"request_id": "7fb54bce-87e8-4865-9773-106726c90c15"
}
A country without holiday data returns "Unsupported holiday calendar." with the code in details.
Start counting
- Diff & business days: the counting rules
- Holiday calendars: every code and weekend
- API reference: try it in the browser
From Alsace to Zürich, the API now knows your customers' calendars.