{
  "schema_version": "1.0",
  "name": "calendar-business-days",
  "display_name": "US Business Calendar & Federal Holidays",
  "description": "US federal holiday calendar, business day calculator, DST transition dates, and fiscal quarter lookup. Fully self-contained — no external API. Supports federal fiscal year (Oct 1 start) and calendar year. Routes: /calendar, /calendar/holidays, /calendar/next-holiday, /calendar/business-days-count.",
  "endpoint": "https://bacapi-calendar-api.workers.dev/calendar",
  "method": "GET",
  "payment": {
    "protocol": "x402",
    "network":  "base",
    "currency": "USDC",
    "amount":   "0.05"
  },
  "routes": [
    {
      "path":        "/calendar",
      "description": "Full calendar info for a date: business day check, fiscal quarter, DST status, days until next holiday",
      "parameters": {
        "date": { "type": "string", "required": false, "description": "YYYY-MM-DD (defaults to today)" }
      }
    },
    {
      "path":        "/calendar/holidays",
      "description": "All 11 US federal holidays for a year, with observed dates",
      "parameters": {
        "year": { "type": "integer", "required": false, "description": "Year (defaults to current year)" }
      }
    },
    {
      "path":        "/calendar/next-holiday",
      "description": "The next federal holiday from a given date",
      "parameters": {
        "date": { "type": "string", "required": false, "description": "YYYY-MM-DD (defaults to today)" }
      }
    },
    {
      "path":        "/calendar/business-days-count",
      "description": "Count business days between two dates (excludes weekends and federal holidays)",
      "parameters": {
        "start": { "type": "string", "required": true,  "description": "Start date YYYY-MM-DD" },
        "end":   { "type": "string", "required": true,  "description": "End date YYYY-MM-DD (inclusive)" }
      }
    }
  ],
  "example_request": "GET /calendar?date=2025-11-11",
  "example_response": {
    "data": {
      "date":             "2025-11-11",
      "day_of_week":      "Tuesday",
      "is_business_day":  false,
      "reason":           "Veterans Day",
      "fiscal_quarter":   { "quarter": "Q1", "year": 2026, "type": "federal" },
      "days_until_next_holiday": 0,
      "next_holiday":     { "name": "Veterans Day", "date": "2025-11-11", "observed": "2025-11-11" }
    },
    "meta": { "priced_at": "0.05 USDC" }
  },
  "tags": ["calendar","holidays","business-days","fiscal-year","federal","dst","scheduling"],
  "category": "calendar"
}
