Date Math
date-math.datemath.workers.dev/v1/pay_dates
Date Math: Upcoming pay or billing dates for monthly, semi-monthly (e.g. 15th and last day), biweekly or weekly schedules, moved off weekends and public holidays (to the previous, next or nearest business day). Use for payroll calendars, invoice due dates and recurring billing.
POST
https://date-math.datemath.workers.dev/v1/pay_datesUptime100% of 1 check 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
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://date-math.datemath.workers.dev/v1/pay_dates", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"count":4,"country":"PH","from":"2026-12-01","schedule":"semi_monthly"}),
});
console.log(await res.json());Example input
{
"count": 4,
"country": "PH",
"from": "2026-12-01",
"schedule": "semi_monthly"
}More from Date Math
- date-math.datemath.workers.dev/v1/addDate Math: Add or subtract years/months/weeks/days/business days/hours/minutes/seconds; month-end clamping; skips weekends and holidays.0.001
- date-math.datemath.workers.dev/v1/business_dayDate Math: Is a date a business day? If not, why (weekend, or which public holiday). Also the next and previous business day, and the month's business-day count, first and last business day. Use for office-open checks, shipping cut-offs, settlement dates. Country holidays, custom holidays and custom workweeks (e.g. Sun–Thu, Mon–Sat).0.001
- date-math.datemath.workers.dev/v1/business_day_scheduleDate Math: Job schedules that skip weekends and public holidays, which cron cannot express: "3rd business day of the month at 09:00", "last business day", "every Monday, or the next business day if it is a holiday", or any cron with a holiday rule. Returns the next runs and whether it runs today. DST-aware. Use for payroll, billing, reports and batch jobs.0.001
- date-math.datemath.workers.dev/v1/business_hoursDate Math: SLA math in working hours: the deadline N business hours after a start time, or business time elapsed between two times. Use for support-ticket SLAs, response-time targets and office-hours deadlines. Custom hours and workdays, holidays, country public holidays, DST-aware.0.001
- date-math.datemath.workers.dev/v1/cityDate Math: Find the time zone and current local time in up to 10 cities by name ("Cebu", "São Paulo", "Springfield" + country). 7,000+ cities. Use for "what time is it in" questions and to get the IANA zone the other tools need.0.001
- date-math.datemath.workers.dev/v1/convertDate Math: Convert an instant or local wall-clock time between IANA time zones (DST-aware).0.001
- date-math.datemath.workers.dev/v1/cronDate Math: Explain a cron expression in plain English and list its next run times in any time zone. Use to check or debug crontab and scheduled-job schedules.0.001
- date-math.datemath.workers.dev/v1/date_rangeDate 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 d0.001
- date-math.datemath.workers.dev/v1/diffDate Math: Difference between two dates or datetimes: calendar (Y/M/D), total days/weeks/hours, business days with custom holidays.0.001
- date-math.datemath.workers.dev/v1/dstDate Math: Daylight saving time for a time zone: does it observe DST, the year's exact clock changes (UTC instant, local before/after), and whether a local time is valid, skipped (spring-forward gap, e.g. 02:30) or repeated (fall-back, happens twice). Use before scheduling jobs, alarms or meetings near clock changes.0.001
- date-math.datemath.workers.dev/v1/free_slotsDate Math: Find meeting times when everyone is free: intersects each participant's working hours (own time zone, workdays, country holidays) minus their busy blocks, then lists slots of the requested length. Up to 10 people, 14 days, optional buffer between meetings. Use for scheduling across calendars and time zones.0.001
- date-math.datemath.workers.dev/v1/holidaysDate Math: Public holidays for a country and year: 207 countries, 2000–2050. Lunar or government-proclaimed dates are rule-based estimates.0.001
