Dates & Times Data API and MCP

The Dates & Times API and MCP server give free, read-only access to five endpoints: age, the gap between two dates with working days, UK holiday entitlement, the long-weekend maximiser and 2026 UK bank holidays. No login or personal data is needed. Data is CC BY 4.0, from gov.uk and the Working Time Regulations.

REST endpoints

All endpoints are GET, return JSON, support CORS, and answer OPTIONS preflight. Responses carry an ETag and edge cache headers. The full machine-readable description is in the OpenAPI 3.1 spec.

Endpoint What it returns
GET /api/age Exact age in years, months, days and total days lived from a date of birth.
https://datesandtimes.co.uk/api/age?dob=1990-05-04
GET /api/date-difference Days, weeks, years, months and Monday-to-Friday working days between two dates.
https://datesandtimes.co.uk/api/date-difference?from=2026-01-01&to=2026-12-31
GET /api/holiday-entitlement UK statutory holiday entitlement from daysPerWeek (with optional fullTimeEntitlement) or hours (12.07% method).
https://datesandtimes.co.uk/api/holiday-entitlement?daysPerWeek=3&fullTimeEntitlement=28
GET /api/long-weekend Best annual-leave dates to book around the 2026 UK bank holidays. nation = ew | sct | ni.
https://datesandtimes.co.uk/api/long-weekend?leaveDays=5&nation=ew
GET /api/bank-holidays The 2026 UK bank holidays. Omit nation for all three; or nation = ew | sct | ni.
https://datesandtimes.co.uk/api/bank-holidays?nation=sct

MCP server

The same data is available to AI assistants over the Model Context Protocol at https://datesandtimes.co.uk/mcp (streamable HTTP, JSON-RPC 2.0, read-only). The manifest is at /.well-known/mcp.json. Tools:

The 2026 UK bank holidays are also exposed as MCP resources (datekit://bank-holidays and per-nation variants), so an assistant can read the list directly.

Licence and sources

The data is licensed CC BY 4.0: free to reuse with attribution to Dates & Times. Bank-holiday dates come from gov.uk Bank Holidays; holiday-entitlement rules from GOV.UK and the Working Time Regulations 1998. Figures are general calendar and time information, not legal or employment advice. For the human pages, see the calculators, bank holidays and UK calendar data.

Dates & Times editorial team

Written and reviewed by the Dates & Times editorial team.

Last reviewed: 18 November 2026