← All tool references

Date & Time · execute

Date Calculator

Add or subtract calendar days, weeks, months, or years to land on the resulting date.

Open public tool

Overview

Category
Date & Time
API mode
execute
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/date-calculator

View this descriptor as JSON

Execute availability

This tool has an execute route defined by its descriptor. Server-side execution is currently unavailable, so requests return api_not_launched.

POST /api/v1/tools/date-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 first date in the range.
operation · string · required
Choose whether to add, subtract, multiply, divide, or apply the listed operation. Accepted values: add, subtract.
amount · number · required
Enter the quantity to convert before choosing the source and destination units.
unit · string · required
Choose the unit used by the values you entered. Accepted values: days, weeks, months, years.
{
    "type": "object",
    "properties": {
        "start_date": {
            "type": "string",
            "description": "Choose the first date in the range."
        },
        "operation": {
            "type": "string",
            "enum": [
                "add",
                "subtract"
            ],
            "description": "Choose whether to add, subtract, multiply, divide, or apply the listed operation."
        },
        "amount": {
            "type": "number",
            "description": "Enter the quantity to convert before choosing the source and destination units."
        },
        "unit": {
            "type": "string",
            "enum": [
                "days",
                "weeks",
                "months",
                "years"
            ],
            "description": "Choose the unit used by the values you entered."
        }
    },
    "required": [
        "start_date",
        "operation",
        "amount",
        "unit"
    ],
    "additionalProperties": false
}

Output schema

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

date · string
Browser-calculated date.
operation · string
Browser-calculated operation.
amount · number
Browser-calculated amount.
unit · string
Browser-calculated unit.
{
    "type": "object",
    "properties": {
        "date": {
            "type": "string",
            "description": "Browser-calculated date."
        },
        "operation": {
            "type": "string",
            "description": "Browser-calculated operation."
        },
        "amount": {
            "type": "number",
            "description": "Browser-calculated amount."
        },
        "unit": {
            "type": "string",
            "description": "Browser-calculated unit."
        }
    },
    "additionalProperties": false
}

Date Calculator: Add 10 days

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/date-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "start_date": "2026-07-11",
    "operation": "add",
    "amount": 10,
    "unit": "days"
}'
{
    "ok": true,
    "data": {
        "slug": "date-calculator",
        "result": {
            "values": {
                "date": "2026-07-21",
                "operation": "add",
                "amount": 10,
                "unit": "days"
            },
            "display": {
                "display": "2026-07-21"
            },
            "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.