Date and time calculations in pure code
Date and time calculations in pure code. op=diff: calendar years, months and days between two dates, and the total days. op=add or subtract: move a date by years, months, weeks, days, hours or minutes (month ends are clamped). op=info: weekday, ISO week, day of year, quarter, and age from birthDate. op=tz: a local date-time in one IANA time zone shown in another. Impossible dates are a 400 with the reason.
Answeringour last check, 2026-10-18
1 of 1checks answered this week
32 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
GET https://api.sitecheck-api.workers.dev/api/date/calc
| Category | Code and developer |
|---|---|
| Provider host | api.sitecheck-api.workers.dev |
| Networks | eip155:5042, eip155:8453, solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp |
| Payment schemes | exact |
| Self-reported calls, 30 days | 2 from 2 payers (the provider's figure, not ours) |
Our checks, last 30 days
| Day | Result | HTTP | Asked | Time |
|---|---|---|---|---|
| 2026-10-18 | valid payment request | 402 | $0.001 | 32 ms |
Example input (from the provider)
{
"method": "GET",
"queryParams": {
"from": "2000-02-29",
"op": "diff",
"to": "2026-10-15"
},
"type": "http"
}
Promised output schema (from the provider)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"method": {
"enum": [
"GET"
],
"type": "string"
},
"queryParams": {
"properties": {
"amount": {
"description": "add, subtract: whole number",
"type": "string"
},
"asOf": {
"description": "info: the date the age is counted to, default today (UTC)",
"type": "string"
},
"birthDate": {
"description": "info: date of birth YYYY-MM-DD, for the age",
"type": "string"
},
"date": {
"description": "add, subtract, info: date YYYY-MM-DD",
"type": "string"
},
"datetime": {
"description": "tz: local date-time like 2026-10-15T09:30",
"type": "string"
},
"from": {
"description": "diff: start date YYYY-MM-DD; tz: local date-time YYYY-MM-DDTHH:MM",
"type": "string"
},
"from_zone": {
"description": "tz: IANA zone of the given time, e.g. Europe/Berlin",
"type": "string"
},
"op": {
"description": "diff, add, subtract, info or tz",
"type": "string"
},
"to": {
"description": "diff: end date YYYY-MM-DD",
"type": "string"
},
"to_zone": {
"description": "tz: IANA zone to show, e.g. America/New_York",
"type": "string"
},
"unit": {
"description": "add, subtract: years, months, weeks, days (default), hours or minutes",
"type": "string"
}
},
"required": [
"op"
],
"type": "object"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}