GET /v1/count-business-days
Count business days between two dates.
| Name | Type | Required | Description |
|---|
start | string | Yes | Start date in YYYY-MM-DD format. This date is excluded from the count. |
end | string | Yes | End date in YYYY-MM-DD format. This date is included in the count. |
country | string | Yes | ISO 3166-1 alpha-2 country code. Case-insensitive. |
region | string | No | ISO 3166-2 subdivision suffix. Requires paid plan. |
curl -X GET "https://jday-api.jday.workers.dev/v1/count-business-days?start=2026-01-01&end=2026-03-31&country=US" \
-H "Authorization: Bearer jday_live_xxx" \
-H "Accept: application/json"
{
"start_date": "2026-01-01",
"end_date": "2026-03-31",
"business_days": 62,
"total_calendar_days": 89,
"weekends": 26,
"holidays_on_weekdays": 1,
"holidays": [
{
"date": "2026-01-19",
"official_date": null,
"name": "Martin Luther King Jr. Day",
"local_name": null,
"type": "public",
"date_accuracy": "exact"
}
],
"country": "US",
"region": null
}
| Field | Type | Description |
|---|
start_date | string | The supplied start date. |
end_date | string | The supplied end date. |
business_days | integer | Count of business days. May be negative when start > end. |
total_calendar_days | integer | Absolute count of calendar days traversed. |
weekends | integer | Absolute count of weekend dates traversed. |
holidays_on_weekdays | integer | Count of distinct traversed dates with holidays that are not weekends. |
holidays | array | All holiday records on those weekday-holiday dates. Sorted by date, then name. |
country | string | Normalized country code. |
region | string | null | Region code if provided, otherwise null. |
- Start date excluded, end date included.
- Same start and end → all counts are zero,
holidays is empty.
- Reverse order (
start > end) → business_days is negative; absolute counts stay non-negative.
start=2026-01-10&end=2026-01-07 traverses 2026-01-09, 2026-01-08, and 2026-01-07. It excludes 2026-01-10 and includes 2026-01-07.
holidays_on_weekdays counts distinct dates with at least one holiday that are not weekends.
holidays contains all records on those dates.
- Holidays on weekend dates are excluded — those dates are counted under
weekends.
| Condition | Error |
|---|
Missing start, end, or country | 400 missing_parameter |
| Malformed start or end | 400 invalid_date |
| Date outside range | 400 date_out_of_range |
| Unknown country | 400 invalid_country |
| Invalid region | 400 invalid_region |
| Region on Free plan | 403 plan_upgrade_required |