{"slug":"date-math-datemath-workers-dev-v1-time-buckets-600bef","title":"Date Math","host":"date-math.datemath.workers.dev","method":"POST","resource":"https://date-math.datemath.workers.dev/v1/time_buckets","category":"other","description":"Date Math: Split a time range into minute, hour, day, week, month, quarter or year buckets with exact start and end times in a time zone. DST-aware (23- and 25-hour days, repeated and skipped hours), ISO or Sunday/Saturday weeks, fiscal quarters, partial first and last buckets flagged or clipped. Up","price_listed":0.001,"price_asked":0.001,"state":"answering","state_label":"Answering","checks_7d":7,"answered_7d":7,"latency_ms_median":31,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"bucket":"day","from":"2026-10-31","timezone":"America/New_York","to":"2026-11-03"},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"properties":{"bucket":{"default":"day","enum":["minute","hour","day","week","month","quarter","year"],"type":"string"},"clip":{"default":false,"description":"Clip the first and last buckets to [from, to) instead of returning whole buckets flagged partial","type":"boolean"},"fiscal_year_start":{"default":1,"description":"Month the fiscal year starts (1 = January). Quarters, halves and years follow it; fiscal years are named by the calendar year they end in (start 7: FY2027 = July 2026 – June 2027)","maximum":12,"minimum":1,"type":"integer"},"from":{"description":"Range start: YYYY-MM-DD (local midnight), local YYYY-MM-DDTHH:MM, or ISO 8601 with offset","type":"string"},"size":{"default":1,"description":"minute: 1,2,3,4,5,6,10,12,15,20,30; hour: 1,2,3,4,6,8,12. Other buckets: 1","maximum":30,"minimum":1,"type":"integer"},"timezone":{"description":"IANA time zone, e.g. America/New_York (default UTC)","type":"string"},"to":{"description":"Range end, exclusive (same formats)","type":"string"},"week_start":{"default":"monday","description":"First day of the week. monday = ISO weeks (labels like 2026-W46)","enum":["monday","sunday","saturday"],"type":"string"}},"required":["from","to"],"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":{"bucket":{"type":"string"},"buckets":{"items":{"properties":{"end":{"description":"Exclusive","type":"string"},"end_utc":{"type":"string"},"hours":{"description":"Real length: 23 or 25 on clock-change days","type":"number"},"label":{"description":"2026-11-01, 2026-W45, 2026-11, 2026-Q4, FY2027-Q2, 2026, or a local time like 2026-11-01T01:00-05:00","type":"string"},"partial":{"description":"The bucket extends beyond [from, to)","type":"boolean"},"start":{"type":"string"},"start_utc":{"type":"string"}},"required":["label","start","end","start_utc","end_utc","hours"],"type":"object"},"type":"array"},"count":{"type":"integer"},"fiscal_year_start":{"type":"string"},"from":{"type":"string"},"size":{"type":"integer"},"timezone":{"type":"string"},"to":{"type":"string"},"week_start":{"type":"string"}},"required":["timezone","bucket","size","from","to","count","buckets"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-11-27","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":39,"error":null},{"day":"2026-11-26","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":31,"error":null},{"day":"2026-11-25","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":1199,"error":null},{"day":"2026-11-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":24,"error":null},{"day":"2026-11-23","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":1239,"error":null},{"day":"2026-11-22","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":22,"error":null},{"day":"2026-11-21","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":27,"error":null},{"day":"2026-11-20","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":1188,"error":null},{"day":"2026-11-19","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":1156,"error":null},{"day":"2026-11-18","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":32,"error":null},{"day":"2026-11-17","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":1176,"error":null},{"day":"2026-11-16","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":34,"error":null},{"day":"2026-11-15","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":32,"error":null},{"day":"2026-11-14","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":1329,"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":28,"error":null},{"day":"2026-11-11","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":1264,"error":null},{"day":"2026-11-10","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":26,"error":null}],"description_full":"Date Math: Split a time range into minute, hour, day, week, month, quarter or year buckets with exact start and end times in a time zone. DST-aware (23- and 25-hour days, repeated and skipped hours), ISO or Sunday/Saturday weeks, fiscal quarters, partial first and last buckets flagged or clipped. Up to 1,000 buckets. Use for chart axes, time-series grouping and filling empty periods in dashboards.","last_updated":"2026-11-10T13:41:57.598Z","schemes":["exact"]}