# Date Math SLA Live Clock

> Date Math SLA Live Clock is a paid API for AI agents from date-math.datemath.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-21).

Calculates live SLA status for a support ticket: business minutes elapsed and remaining, breach status, and deadline — pausing outside working hours, on weekends, holidays, and during manual pauses.

## Facts

- Endpoint: POST https://date-math.datemath.workers.dev/v1/sla?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/date-math-sla-live-clock-b2a025d7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Z9ViaZOc-eC88sPSvi5Jn

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability date-math-sla-live-clock-b2a025d7 -d '<json body>'
```

Example prompt: Check the live SLA status for a ticket that opened on 2026-11-06 at 16:00 Manila time — the SLA target is 4 business hours, working hours are 09:00–17:00 Monday through Friday, and we're in the Philippines so use the PH holiday calendar. The customer replied at 2026-11-07T09:00+08:00 so pause the clock from then until 2026-11-09T09:00+08:00. Tell me how many business minutes are left, whether it's breached, and when the deadline is.

## When to prefer this

Use this endpoint when you need a live, real-time SLA status check that accounts for business hours, weekends, country-specific public holidays, DST transitions, and manual pause periods — particularly for support ticketing workflows. Prefer this over a simple date-difference calculation when SLA compliance must respect working hours rather than wall-clock time, or when tickets can be paused (e.g. waiting on customer). It is ideal for escalation engines and dashboards that need to know breach status, percent consumed, and exact deadline in a single call.

## Known failure modes

- Invalid or missing 'start' timestamp returns a 400 error
- Unrecognized IANA timezone string causes a validation error
- Country code not in the supported 207-country list returns an error
- Pause entries with end before start produce a validation error
- SLA target of zero or negative minutes causes a computation error
- Malformed ISO 8601 timestamps in pauses array return a 400

## How this service works

Date Math: Live SLA clock for a support ticket: business minutes elapsed and remaining, breached or not, and the deadline. The clock pauses outside working hours, on weekends and holidays, and during manual pauses (e.g. waiting on customer). Custom hours, workdays, country holidays, DST-aware. Use for support-agent SLA tracking and escalation.

## Output

Returns a JSON object with: current status (running/paused/breached), breach flag, SLA deadline in local and UTC, elapsed business minutes, remaining business minutes, percent of SLA used, breached-by minutes (0 if not breached), when the clock resumes if currently paused, and contextual info like deadline weekday and timezone.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "now": {
   "type": "string",
   "description": "Current time (default: now), same formats as start"
  },
  "start": {
   "type": "string",
   "description": "When the SLA clock started: ISO 8601 with offset, or local YYYY-MM-DDTHH:MM in timezone"
  },
  "pauses": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "start"
    ],
    "properties": {
     "end": {
      "type": "string",
      "description": "ISO 8601 with offset; omit while the pause is ongoing"
     },
     "start": {
      "type": "string",
      "description": "ISO 8601 with offset"
     }
    }
   },
   "maxItems": 100,
   "description": "Manual pauses (e.g. waiting on customer), up to 100"
  },
  "country": {
   "type": "string",
   "example": "US",
   "pattern": "^[A-Za-z]{2}$",
   "description": "ISO 3166-1 alpha-2 country code (207 countries); its public holidays (2000–2050) are excluded from business days"
  },
  "holidays": {
   "type": "array",
   "items": {
    "type": "string",
    "example": "2026-11-07",
    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
   },
   "maxItems": 1000,
   "description": "Extra dates excluded from business-day counts (rest days from workdays are always excluded)"
  },
  "timezone": {
   "type": "string",
   "example": "Asia/Manila",
   "description": "IANA time zone of the support team's working hours"
  },
  "work_end": {
   "type": "string",
   "pattern": "^([01]\\d|2[0-4]):[0-5]\\d$",
   "description": "End of working hours, default 17:00"
  },
  "workdays": {
   "type": "array",
   "items": {
    "type": "integer",
    "maximum": 6,
    "minimum": 0
   },
   "example": [
    1,
    2,
    3,
    4,
    5
   ],
   "maxItems": 7,
   "minItems": 1,
   "description": "Working days of the week, 0 = Sunday. Default [1,2,3,4,5] (Mon–Fri); e.g. [0,1,2,3,4] for Sun–Thu or [1,2,3,4,5,6] for Mon–Sat"
  },
  "sla_hours": {
   "type": "number",
   "description": "SLA target in business hours (combine with sla_minutes)"
  },
  "work_start": {
   "type": "string",
   "pattern": "^([01]\\d|2[0-4]):[0-5]\\d$",
   "description": "Start of working hours, default 09:00"
  },
  "sla_minutes": {
   "type": "number",
   "description": "SLA target in business minutes"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "now": "2026-11-09T10:30:00+08:00",
  "start": "2026-11-06T16:00:00+08:00",
  "status": "running",
  "breached": false,
  "deadline": "2026-11-09T12:30:00+08:00",
  "timezone": "Asia/Manila",
  "resumes_at": null,
  "sla_minutes": 240,
  "deadline_utc": "2026-11-09T04:30:00Z",
  "percent_used": 50,
  "deadline_weekday": "Monday",
  "elapsed_business_minutes": 120,
  "remaining_business_minutes": 120,
  "breached_by_business_minutes": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/date-math-sla-live-clock-b2a025d7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from date-math.datemath.workers.dev](https://www.zero.xyz/host/date-math.datemath.workers.dev/llms.txt)
