Working Days Calculator

Calculate the number of working days (business days) between two dates, with optional support for country-specific holidays. Useful for project planning, delivery estimates, and scheduling.

Get API Key

Overview

Use Cases

  • Project deadline calculations
  • Delivery time estimates
  • Payroll and billing calculations
  • Service level agreement (SLA) tracking
  • Vacation and leave planning

Features

Calculate business days (Monday-Friday)
Optional country-specific holiday adjustments
Support for state/region-level holidays
ISO date format (YYYY-MM-DD)

API Endpoints

Calculate Working Days

Calculate the number of working days between two dates, optionally accounting for country-specific holidays

GET
https://api.requiems.xyz/v1/places/working-days

Parameters

Name Type Required Description
from string Required Start date in YYYY-MM-DD format (ISO 8601)
to string Required End date in YYYY-MM-DD format (ISO 8601). Must be >= from date.
country string Optional ISO 3166-1 alpha-2 country code (e.g., "US", "GB", "FR"). When provided, country-specific holidays are excluded from working days count.
subdivision string Optional ISO 3166-2 subdivision code for state/region within the country (e.g., "NY" for New York, "CA" for California). Only used when country is provided.

Try it out

Live Demo
Request

Start date in YYYY-MM-DD format (ISO 8601)

End date in YYYY-MM-DD format (ISO 8601). Must be >= from date.

ISO 3166-1 alpha-2 country code (e.g., "US", "GB", "FR"). When provided, country-specific holidays are excluded from working days count.

ISO 3166-2 subdivision code for state/region within the country (e.g., "NY" for New York, "CA" for California). Only used when country is provided.

Response Fields

Field Type Description
working_days integer Number of working days between the two dates (excluding weekends and optionally holidays)
from string Start date (echoed from request)
to string End date (echoed from request)
country string Country code (echoed from request, empty string if not provided)
subdivision string Subdivision code (echoed from request, empty string if not provided)

Code Examples

# Without country (only excludes weekends)
curl "https://api.requiems.xyz/v1/places/working-days?from=2024-02-23&to=2024-02-28" \
  -H "requiems-api-key: YOUR_API_KEY"

# With country (excludes weekends and US federal holidays)
curl "https://api.requiems.xyz/v1/places/working-days?from=2024-02-23&to=2024-02-28&country=US" \
  -H "requiems-api-key: YOUR_API_KEY"

# With country and subdivision (excludes weekends and US + NY holidays)
curl "https://api.requiems.xyz/v1/places/working-days?from=2024-02-23&to=2024-02-28&country=US&subdivision=NY" \
  -H "requiems-api-key: YOUR_API_KEY"

Error Responses

400

bad_request

The from and to parameters are required, or to date is before from date, or invalid date format

Frequently Asked Questions