Skip to content

Date math, with the steps.

Loading the date tools…

Date math
Named dates
Schedules
Browse examples

Expressions that add or subtract time from another date.

Change timezone or format

Choose a suggestion or enter an IANA timezone.

Preferences saved in this browser.
Developer toolsCopy JSON stays on your device. API compare sends the phrase you typed, or the interpreted expression for a single-date result, to this server.

Use the structured interpretation in your own application. Integration guide

Compare with the API

Send this request to the server and compare the dates.

Enter a phrase above to build a request.

Sends the phrase or interpreted expression shown below, plus your settings, to Cloudflare. Avoid private information. Privacy details

API reference

GET /api/parse

Returns the date and calculation steps as JSON. No API key needed.

expressionRequired
The phrase to calculate. Up to 200 characters.
timezoneOptional
An IANA timezone, such as America/Chicago. Defaults to UTC.
referenceOptional
A starting instant with an offset, such as 2026-01-26T19:30:00Z. Defaults to the request time; reuse it to reproduce a result.
formatOptional
A date-fns display format, such as yyyy-MM-dd. Does not change the calculation.

Calendar rules

  • Changes run in written order. Whole months and years clamp to the last valid day at each step.
  • Whole days and weeks follow the local calendar. Their fractional parts use elapsed time.
  • Fractional years become whole months first. Any remaining month or year fraction uses a labelled day approximation.

Limits and errors

About 120 requests per minute per IP at each Cloudflare location. HTTP 429 means wait a minute; HTTP 503 means try again shortly.

Invalid, unknown, or repeated parameters return HTTP 400. URLs over 4,096 characters return HTTP 414. Responses are not cached.

Engine v2 removed preserveDayOfMonth. Omit it from requests.