Age in complete years on a date and the exact dates a minimum or maximum age is reached (leap-day births)

$0.005 USDC per call · Business, finance and compliance · POST /api/v1/age-threshold · Id age-threshold

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

FieldTypeRequiredDescription
asOfstring; length 0..10yes
leapDayRulestring; one of "feb-28", "mar-1"noIn 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.
itemsarray<object>; max 100 itemsyes

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.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: 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.
itemsarray<object>no
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways 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