Age in complete years on a date and the exact dates a minimum or maximum age is reached (leap-day births)
For up to 100 people, computes age in complete years and months on a caller asOf date, the date they reach each minimum age (the birthday) and the first day they exceed each maximum age, and checks min/max age requirements; 29 February births need a declared common-year rule (28 February or 1 March) because jurisdictions differ. Built for an agent checking eligibility (18+, under 65, 21 to buy). It uses the birth date as a calendar date with no time zone or time of day, does not know a jurisdiction's age-reckoning rules (East Asian age, 'age at last birthday' contracts) and never reads the clock.
What you get
Birthday-eve and leap-day cases flip eligibility; the threshold date is returned so it can be audited.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/age-threshold. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/age-threshold \
-H 'content-type: application/json' \
-d '{"asOf":"2026-11-04","items":[{"id":"p1","birthDate":"2008-11-04","minAgeYears":18},{"id":"p2","birthDate":"2008-11-05","minAgeYears":18}]}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
asOf | string; length 0..10 | yes | |
leapDayRule | string; one of "feb-28", "mar-1" | no | In common years a 29 February birthday is observed on 28 February or on 1 March depending on the legal context you apply; you must choose. Required if any birth date is 29 February. |
items | array<object>; max 100 items | yes |
Example request body
{
"asOf": "2026-11-04",
"items": [
{
"id": "p1",
"birthDate": "2008-11-04",
"minAgeYears": 18
},
{
"id": "p2",
"birthDate": "2008-11-05",
"minAgeYears": 18
}
]
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
items | array<object> | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the calendar-deadline-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent