← Back to directory

Date Math: Turn a reporting period into exact start and end dates and times in a...

https://date-math.datemath.workers.dev/v1/date_range

Overview

Date Math: Turn a reporting period into exact start and end dates and times in a time zone: "last month", "this quarter", "YTD", "MTD", "last 7 days", "next 2 weeks", "2026-Q3", "2026-W14". Optional comparison period (previous period, or same period last year), fiscal years starting in any month, and Monday, Sunday or Saturday week starts. Use for analytics queries, SQL date filters, reports and dashboards.

Protocol x402 (POST)
Price $0.0010
Payment Asset USD Coin
Payment Network eip155:8453
Category uncategorized
Provider Date Math
Source bazaar
Indexed 2026-11-10 15:08:49

Health

Status unknown
Latency (p50) —
Uptime (30d) —
Reliability Score —
Last Checked Never
Last Healthy Never
Consecutive Failures 0

x402 Payment Validation

Payment Requirements —
Asset Verified —
Facilitator —

Input Schema

{ "body": { "as_of": "2026-11-10", "compare": "previous_year", "period": "last_month", "timezone": "America/New_York" }, "bodyType": "json", "method": "POST", "type": "http" }

Output Schema

{ "example": { "as_of": "2026-11-10", "comparison": { "days": 31, "end_date": "2025-10-31", "end_exclusive": "2025-11-01T00:00:00-04:00", "end_exclusive_utc": "2025-11-01T04:00:00Z", "label": "October 2025", "method": "same dates one year earlier", "start": "2025-10-01T00:00:00-04:00", "start_date": "2025-10-01", "start_utc": "2025-10-01T04:00:00Z", "type": "previous_year" }, "days": 31, "end_date": "2026-10-31", "end_exclusive": "2026-11-01T00:00:00-04:00", "end_exclusive_utc": "2026-11-01T04:00:00Z", "label": "October 2026", "period": "last_month", "start": "2026-10-01T00:00:00-04:00", "start_date": "2026-10-01", "start_utc": "2026-10-01T04:00:00Z", "timezone": "America/New_York" }, "type": "json" }