{"slug":"date-math-datemath-workers-dev-v1-sla-1c7068","title":"Date Math","host":"date-math.datemath.workers.dev","method":"POST","resource":"https://date-math.datemath.workers.dev/v1/sla","category":"other","description":"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 f","price_listed":0.001,"price_asked":0.001,"state":"answering","state_label":"Answering","checks_7d":7,"answered_7d":7,"latency_ms_median":36,"reported_calls_30d":2,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"country":"PH","now":"2026-11-09T10:30","pauses":[{"end":"2026-11-09T01:30:00Z","start":"2026-11-09T01:00:00Z"}],"sla_hours":4,"start":"2026-11-06T16:00","timezone":"Asia/Manila"},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"properties":{"country":{"description":"ISO 3166-1 alpha-2 country code (207 countries); its public holidays (2000–2050) are excluded from business days","example":"US","pattern":"^[A-Za-z]{2}$","type":"string"},"holidays":{"description":"Extra dates excluded from business-day counts (rest days from workdays are always excluded)","items":{"example":"2026-11-07","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"maxItems":1000,"type":"array"},"now":{"description":"Current time (default: now), same formats as start","type":"string"},"pauses":{"description":"Manual pauses (e.g. waiting on customer), up to 100","items":{"properties":{"end":{"description":"ISO 8601 with offset; omit while the pause is ongoing","type":"string"},"start":{"description":"ISO 8601 with offset","type":"string"}},"required":["start"],"type":"object"},"maxItems":100,"type":"array"},"sla_hours":{"description":"SLA target in business hours (combine with sla_minutes)","type":"number"},"sla_minutes":{"description":"SLA target in business minutes","type":"number"},"start":{"description":"When the SLA clock started: ISO 8601 with offset, or local YYYY-MM-DDTHH:MM in timezone","type":"string"},"timezone":{"description":"IANA time zone of the support team's working hours","example":"Asia/Manila","type":"string"},"work_end":{"description":"End of working hours, default 17:00","pattern":"^([01]\\d|2[0-4]):[0-5]\\d$","type":"string"},"work_start":{"description":"Start of working hours, default 09:00","pattern":"^([01]\\d|2[0-4]):[0-5]\\d$","type":"string"},"workdays":{"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","example":[1,2,3,4,5],"items":{"maximum":6,"minimum":0,"type":"integer"},"maxItems":7,"minItems":1,"type":"array"}},"required":["start","timezone"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"properties":{"breached":{"type":"boolean"},"breached_by_business_minutes":{"type":"integer"},"deadline":{"type":"string"},"deadline_utc":{"type":"string"},"deadline_weekday":{"type":"string"},"elapsed_business_minutes":{"type":"integer"},"now":{"type":"string"},"percent_used":{"type":"number"},"remaining_business_minutes":{"type":"integer"},"resumes_at":{"description":"When the clock restarts, if paused by working hours","type":["string","null"]},"sla_minutes":{"type":"integer"},"start":{"type":"string"},"status":{"enum":["running","breached","paused_manual","paused_outside_hours","paused_weekend","paused_holiday"],"type":"string"},"timezone":{"type":"string"}},"required":["timezone","start","now","sla_minutes","elapsed_business_minutes","remaining_business_minutes","breached","breached_by_business_minutes","percent_used","status","resumes_at","deadline","deadline_utc","deadline_weekday"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-11-26","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":29,"error":null},{"day":"2026-11-25","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":36,"error":null},{"day":"2026-11-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":28,"error":null},{"day":"2026-11-23","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":36,"error":null},{"day":"2026-11-22","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":1318,"error":null},{"day":"2026-11-21","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":45,"error":null},{"day":"2026-11-20","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":33,"error":null},{"day":"2026-11-19","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":31,"error":null},{"day":"2026-11-18","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":33,"error":null},{"day":"2026-11-17","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":33,"error":null},{"day":"2026-11-16","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":24,"error":null},{"day":"2026-11-15","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":1225,"error":null},{"day":"2026-11-14","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":36,"error":null},{"day":"2026-11-13","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":33,"error":null},{"day":"2026-11-12","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":27,"error":null},{"day":"2026-11-11","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":30,"error":null},{"day":"2026-11-10","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":27,"error":null},{"day":"2026-11-09","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":1694,"error":null},{"day":"2026-11-08","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":1343,"error":null}],"description_full":"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.","last_updated":"2026-11-09T11:11:33.941Z","schemes":["exact"]}