ToolAssay

Date Math

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.

Answeringour last check, 2026-11-27
7 of 7checks answered this week
30 msmedian answer time
$0.001listed price per call
$0.001price it asked us

Paid test badge: not yet. The checks above are free: we call the tool without paying and read the payment request it sends back. The Verified badge needs paid calls whose answers match the promised output, and nobody can buy a badge.

Endpoint

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

CategoryEverything else
Provider hostdate-math.datemath.workers.dev
Networkseip155:8453
Payment schemesexact
Self-reported calls, 30 days1 from 1 payers (the provider's figure, not ours)

Our checks, last 30 days

DayResultHTTPAskedTime
2026-11-27 valid payment request 402$0.001 29 ms
2026-11-26 valid payment request 402$0.001 36 ms
2026-11-25 valid payment request 402$0.001 21 ms
2026-11-24 valid payment request 402$0.001 30 ms
2026-11-23 valid payment request 402$0.001 1575 ms
2026-11-22 valid payment request 402$0.001 32 ms
2026-11-21 valid payment request 402$0.001 28 ms
2026-11-20 valid payment request 402$0.001 26 ms
2026-11-19 valid payment request 402$0.001 30 ms
2026-11-18 valid payment request 402$0.001 1165 ms
2026-11-17 valid payment request 402$0.001 1232 ms
2026-11-16 valid payment request 402$0.001 29 ms
2026-11-15 valid payment request 402$0.001 31 ms
2026-11-14 valid payment request 402$0.001 32 ms
2026-11-13 valid payment request 402$0.001 31 ms
2026-11-12 valid payment request 402$0.001 1241 ms
2026-11-11 valid payment request 402$0.001 1249 ms
2026-11-10 valid payment request 402$0.001 26 ms

Example input (from the provider)

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

Promised output schema (from the provider)

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "body": {
          "properties": {
            "as_of": {
              "description": "Reference date for relative periods: YYYY-MM-DD, or a datetime (its local date is used). Default: today in timezone",
              "type": "string"
            },
            "compare": {
              "description": "Also return a comparison range. previous_period: the same length immediately before (to-date periods: the same number of days into the previous unit). previous_year: the same dates a year earlier (weeks: 52 weeks earlier, same weekdays)",
              "enum": [
                "previous_period",
                "previous_year"
              ],
              "type": "string"
            },
            "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 \u2013 June 2027)",
              "maximum": 12,
              "minimum": 1,
              "type": "integer"
            },
            "include_today": {
              "description": "End the range with today (inclusive). Default true for *_to_date periods, false for last_N_* periods (complete days only)",
              "type": "boolean"
            },
            "period": {
              "description": "Relative: today, yesterday, tomorrow, this_/last_/next_ + week|month|quarter|half|year, week_to_date|month_to_date|quarter_to_date|year_to_date (or wtd, mtd, qtd, ytd), last_N_days|weeks|months|quarters|years, next_N_days|weeks|months|... Spaces work too (\"last 7 days\"). last_N_days = N complete days before today; last_N_months = N complete calendar months before this one. Explicit: 2026, 2026-H1, 2026-Q3 or \"Q3 2026\", 2026-03, 2026-W14 (ISO week), 2026-03-15",
              "example": "last_month",
              "type": "string"
            },
            "timezone": {
              "description": "IANA time zone, e.g. America/New_York (default UTC)",
              "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": [
            "period"
          ],
          "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": {
            "as_of": {
              "description": "The local date that relative periods were resolved against",
              "type": "string"
            },
            "comparison": {
              "properties": {
                "days": {
                  "type": "integer"
                },
                "end_date": {
                  "description": "Last day, inclusive (YYYY-MM-DD)",
                  "type": "string"
                },
                "end_exclusive": {
                  "description": "Local end, exclusive: the midnight after end_date. Filter with >= start and < end_exclusive",
                  "type": "string"
                },
                "end_exclusive_utc": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "method": {
                  "type": "string"
                },
                "start": {
                  "description": "Local start, ISO 8601 with offset (local midnight)",
                  "type": "string"
                },
                "start_date": {
                  "description": "First day (YYYY-MM-DD)",
                  "type": "string"
                },
                "start_utc": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method",
                "label",
                "start_date",
                "end_date",
                "days",
                "start",
                "end_exclusive",
                "start_utc",
                "end_exclusive_utc"
              ],
              "type": "object"
            },
            "days": {
              "type": "integer"
            },
            "end_date": {
              "description": "Last day, inclusive (YYYY-MM-DD)",
              "type": "string"
            },
            "end_exclusive": {
              "description": "Local end, exclusive: the midnight after end_date. Filter with >= start and < end_exclusive",
              "type": "string"
            },
            "end_exclusive_utc": {
              "type": "string"
            },
            "fiscal_year_start": {
              "description": "Month name, when not January",
              "type": "string"
            },
            "label": {
              "description": "e.g. \"October 2026\", \"Q3 2026\", \"2026-W46\", \"FY2027\", or \"start to end\"",
              "type": "string"
            },
            "period": {
              "type": "string"
            },
            "start": {
              "description": "Local start, ISO 8601 wi

This page as JSON