← All tool references

Date & Time · not_available

Business Days Calculator

Count weekdays between two dates and optionally exclude a custom list of holidays.

Open public tool

Overview

Category
Date & Time
API mode
not_available
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/business-days-calculator

View this descriptor as JSON

Execute availability

This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.

POST /api/v1/tools/business-days-calculator/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

start_date · string · required
Choose the start date used in the date calculation.
end_date · string · required
Choose the end date used in the date calculation.
holidays · string · optional
Optionally enter YYYY-MM-DD holiday dates separated by commas or new lines.
include_end_date · boolean · optional
Turn include end date on or off.
{
    "type": "object",
    "properties": {
        "start_date": {
            "type": "string",
            "description": "Choose the start date used in the date calculation."
        },
        "end_date": {
            "type": "string",
            "description": "Choose the end date used in the date calculation."
        },
        "holidays": {
            "type": "string",
            "description": "Optionally enter YYYY-MM-DD holiday dates separated by commas or new lines."
        },
        "include_end_date": {
            "type": "boolean",
            "description": "Turn include end date on or off."
        }
    },
    "required": [
        "start_date",
        "end_date"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

business_days · number
Business days produced by the calculation.
calendar_days · number
Calendar days produced by the calculation.
weekend_days · number
Weekend days produced by the calculation.
excluded_holidays · number
Excluded weekday holidays produced by the calculation.
{
    "type": "object",
    "properties": {
        "business_days": {
            "type": "number",
            "description": "Business days produced by the calculation."
        },
        "calendar_days": {
            "type": "number",
            "description": "Calendar days produced by the calculation."
        },
        "weekend_days": {
            "type": "number",
            "description": "Weekend days produced by the calculation."
        },
        "excluded_holidays": {
            "type": "number",
            "description": "Excluded weekday holidays produced by the calculation."
        }
    },
    "additionalProperties": false
}

Business Days Calculator example

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/business-days-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "start_date": "2026-07-13",
    "end_date": "2026-07-31",
    "holidays": "",
    "include_end_date": true
}'
{
    "ok": true,
    "data": {
        "slug": "business-days-calculator",
        "result": {
            "values": {
                "business_days": 15,
                "calendar_days": 19,
                "weekend_days": 4,
                "excluded_holidays": 0
            },
            "display": {
                "display": "15"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.