Skip to content
Fourohtwo

Date Math

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

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 d

BaseAnswering
POSThttps://date-math.datemath.workers.dev/v1/date_range

Uptime100% of 5 checks in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://date-math.datemath.workers.dev/v1/date_range", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"as_of":"2026-11-10","compare":"previous_year","period":"last_month","timezone":"America/New_York"}),
});
console.log(await res.json());

Example input

{
  "as_of": "2026-11-10",
  "compare": "previous_year",
  "period": "last_month",
  "timezone": "America/New_York"
}

More from Date MathProvider status