An agent that books meetings, quotes delivery dates or chases invoices has to know what day it is and how calendars work. A language model knows neither by default. This article explains where date errors come from, what they look like in agent tasks, and how to remove them by giving the model tools for time and calendars instead of asking it to work the answer out.
It is written for developers who build agents or chat features on top of a model API. The examples use real endpoints, so you can copy them.
Why a model does not know what day it is
A model's weights are fixed when training ends. Nothing in them changes as time passes, so the model has no sense of "now". Asked for today's date with no other information, it can only estimate from what its training data looked like.
That estimate is skewed towards the past. The months just before a training cutoff are thinly covered, because the web has not finished writing about them yet. The paper Dated Data: Tracing Knowledge Cutoffs in Large Language Models measured this and found that a model's effective cutoff, the date its knowledge actually lines up with, often differs from the cutoff its developer reports. A model deployed a year or two after training then adds a second error: it tends to assume that little time has passed since its data ended.
Most chat products hide this by putting the current date in the system prompt. A bare API call does not. If your agent calls a model API directly and you have not supplied the date, the model is guessing.
Why calendar arithmetic goes wrong
Knowing today's date is only the start. Most date questions need arithmetic: the weekday of a date, the number of days between two dates, the date 30 days from now. A model does not run an algorithm for these. It predicts tokens, and its accuracy depends on how closely the question resembles patterns it has seen.
Research supports treating this as a known weakness. Google's Test of Time benchmark uses synthetic problems, which a model cannot have memorised, to test temporal reasoning and arithmetic separately. A 2026 study, What Really Controls Temporal Reasoning in Large Language Models, looked at how tokenisers split dates into fragments and reported that this fragmentation is a bottleneck for date arithmetic in lower-resource languages and less common calendars, while models are more robust to it in high-resource settings.
In practice the errors cluster in a few places:
- Weekdays. Finding the weekday of an arbitrary date needs modular arithmetic over month lengths and leap years. Models are often right for well-known dates and off by a day for others.
- Month and year boundaries. Adding 45 days across February, or counting days across a leap day, produces off-by-one answers.
- Time zones and daylight saving. Offsets change during the year, and not on the same day everywhere. In 2026 clocks went back on 25 October in the UK and on 1 November in the US, so for that week London and New York were four hours apart rather than the usual five.
- Business days. These depend on data, not arithmetic: which days are public holidays in a given country and region, and which days are the weekend there.
The last two cannot be fixed by a better model. Time zone rules and public holidays are decided by governments and change. The IANA time zone database is updated several times a year for that reason.
What this looks like in an agent
The failures are quiet. The agent does not report an error; it gives a confident, plausible, wrong answer:
- A support agent promises delivery "within three working days, by Monday 28 December" to a customer in England. That Monday is a bank holiday.
- A scheduling agent proposes 15:00 London time for a call with New York in the week when the two countries are out of step on daylight saving, and one side arrives an hour off.
- A finance agent computes an invoice due date of "30 days from today" from the wrong today, because nobody told it the date.
- A reminder is scheduled for "next Friday" and lands on the wrong Friday because the model miscounted from the current weekday.
Each of these is cheap to prevent, and expensive to discover after it has been sent to a customer.
Give the model tools, not arithmetic
The fix is to stop asking the model to compute. A model is good at deciding which question needs answering and at reading a structured result. A function is good at calendars. Tool calling connects the two: you describe a function to the model, the model emits a call with arguments, your code runs it, and the result goes back into the conversation.
Three rules cover most cases:
- Put the current date, time and the user's time zone in the system prompt on every request. This is free and removes the "what is today" guess.
- Provide tools for anything that involves arithmetic or reference data: current time in another zone, date differences, working days, holidays.
- Tell the model, in the system prompt or the tool descriptions, to use the tools instead of estimating.
Worked example: is this date a working day
APIStack's Public Holidays API has a /check endpoint that answers whether a date is a working day in a country or region. Called over REST it looks like this.
curl "https://apistack.online/api/data/public-holidays/v1/check?country=GB®ion=ENG&date=2026-12-28" \
-H "x-api-key: YOUR_API_KEY"Boxing Day falls on a Saturday in 2026, so in England the bank holiday moves to Monday 28 December. The response says so directly (the metadata block is omitted here):
{
"success": true,
"data": {
"country": "GB",
"region": "ENG",
"weekend": ["Saturday", "Sunday"],
"date": "2026-12-28",
"dayOfWeek": "Monday",
"isWorkingDay": false,
"isWeekend": false,
"isHoliday": true,
"holiday": { "name": "Boxing Day (substitute day)", "type": "public" }
}
}The result includes the weekday name as well as the verdict. That matters: the model never has to derive "Monday" from "2026-12-28" itself.
The tool definition
To make this available to a model, describe it as a tool. The same endpoint is exposed as check_working_day on APIStack's facts MCP server, and this is its definition as the server lists it:
{
"name": "check_working_day",
"title": "Is a date a working day?",
"description": "Whether a date is a working day, a weekend or a public holiday in a country or region (weekends follow the country).",
"inputSchema": {
"type": "object",
"properties": {
"country": { "type": "string", "description": "ISO code or English name" },
"date": { "type": "string", "description": "YYYY-MM-DD" },
"region": { "type": "string", "description": "Optional state or region" }
},
"required": ["country", "date"],
"additionalProperties": false
}
}The shape follows the tools section of the Model Context Protocol specification: a name, a description the model reads to decide when to call it, and a JSON Schema for the arguments. If you use a model API's native tool calling instead of MCP, the same three parts apply under slightly different field names.
The tool call
When the user asks whether an order can ship on 28 December to an address in England, the model emits a call instead of an answer. Over MCP that is a JSON-RPC tools/call request, which you can reproduce with curl:
curl -X POST "https://apistack.online/api/mcp/facts" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "check_working_day",
"arguments": { "country": "GB", "region": "ENG", "date": "2026-12-28" }
}
}'The server at https://apistack.online/api/mcp/facts accepts a limited number of calls a day without a key, so an agent can be connected and tried before you sign up; send an x-api-key header to use your plan's quota instead. The result comes back as the same data object shown above, both as text and as structuredContent, and the model reads isWorkingDay: false and the holiday name from it.
Chaining tools
The delivery promise from earlier needs one more step. The add_working_days tool maps to the /add endpoint, which takes country, date, days and an optional region. Asked for three working days after 23 December 2026 in England, it returns 30 December 2026, a Wednesday, and lists the two holidays it skipped: Christmas Day and the Boxing Day substitute. The model's job is reduced to passing the right arguments and phrasing the answer.
For time zones, get_current_time wraps the World Time API. It takes a timezone (an IANA zone such as Europe/London, or several separated by commas) and an optional at instant, and returns the local time, the UTC offset, whether daylight saving is in effect and when the next clock change happens.
Designing date tools that models use well
A few choices make date tools more reliable, whoever provides them.
Accept and return ISO 8601 dates (2026-12-28), never locale formats. 03/04/2026 is 3 April or 4 March depending on the reader, and the model cannot tell which you meant.
Return derived facts along with the answer. A weekday name, a UTC offset or the list of holidays skipped lets the model explain its answer without doing any arithmetic of its own.
Keep tools narrow and name them after the question: check_working_day and add_working_days are easier for a model to choose between than one calendar tool with a mode argument.
Make errors instructive. A tool error that says which argument was wrong and what format is expected gives the model what it needs to correct the call and retry.
Summary
- A model has no clock. Without the current date in its context it guesses, and the guess leans towards its training period.
- Calendar arithmetic is pattern prediction for a model, so weekdays, month boundaries and leap years produce off-by-one errors.
- Time zone rules and public holidays are data that changes. No amount of reasoning recovers them; they have to be looked up.
- Put the date, time and time zone in the system prompt, and give the model tools for everything else: current time, date differences, working days and holidays.
- Design date tools to take ISO 8601 input, return derived facts such as the weekday, and fail with messages the model can act on.