apyhub

Working Day Calculator

What it does

Working Day Calculator counts business days between two dates for a given country. Send a country, start, and end, and get back a breakdown of the date range in calendar terms and working-day terms.

The response includes total_days for the full inclusive range, weekends for Saturday and Sunday days, holidays for public holidays that fall on weekdays, and working_days for the resulting Mon–Fri count after those holidays are removed. That makes it easy to calculate lead times, SLA windows, payroll periods, project timelines, and delivery estimates without hard-coding your own calendar logic.

Use Working Day Calculator when your app needs country-aware date math. For example, you can verify whether a support deadline lands on a working day, estimate how many business days remain in a procurement cycle, or compute working-time reports for internal tooling.

Because the country is part of the request, the result can reflect local public holidays rather than just weekdays. That helps keep schedule calculations consistent across regions and avoids off-by-one errors in date ranges.

GET
Count working days between two dates
https://api.eu.apyverse.com/apyhub/count-working-days

QUICKSTART

GUIDE

Quickstart

Count the working days between two dates for a country. The dates and country are passed as query parameters.

curl -X GET "https://api.eu.apyverse.com/apyhub/count-working-days?country=DE&start=2025-01-01&end=2025-01-31" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a data object. data contains holidays, weekends, total_days, and working_days integers for the requested date range.

{
  "data": {
    "holidays": 1,
    "weekends": 8,
    "total_days": 31,
    "working_days": 22
  }
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Counts the working days between two dates for a given country. It returns a JSON object with a data object containing the calendar-day breakdown and the calculated working_days value.

Query Parameter(s)

AttributeTypeMandatoryDescription
countryStringYesCountry code used to determine public holidays.
startStringYesStart date in date format (YYYY-MM-DD).
endStringYesEnd date in date format (YYYY-MM-DD).

Response

Returns a JSON object with a data object. The data object contains four integer fields: holidays, weekends, total_days, and working_days. holidays counts public holidays that fell on a weekday, weekends counts Saturday and Sunday days in the range, total_days counts calendar days between start and end inclusive, and working_days counts Mon–Fri days excluding public holidays.

AttributeTypeMandatoryDescription
dataObjectYesContainer for the calculated day counts.
data.holidaysIntegerNoPublic holidays that fell on a weekday (reduced working day count).
data.weekendsIntegerNoSaturday and Sunday days in the range.
data.total_daysIntegerNoCalendar days between start and end (inclusive).
data.working_daysIntegerNoMon–Fri days excluding public holidays.

Query parameters

Name
Type
Description
endREQUIRED
string
startREQUIRED
string
countryREQUIRED
string
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.