/timecalc:timecalcfrom timecalc
Use the timecalc MCP server for reliable date, calendar, time-zone, instant, and duration calculations. Activate when a user asks about now or today, adds or subtracts dates or durations, calculates elapsed or calendar time, compares dates or instants, converts time zones, inspects date fields, handles leap years or daylight-saving transitions, or verifies date math. Prefer this skill over mental or manual date arithmetic.
Ships in timecalc. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use the timecalc MCP tool evaluate_date_expression whenever a task requires date, duration, instant, calendar, or time-zone arithmetic. Do not calculate the result mentally and do not generate JavaScript as a substitute.
Z or a numeric offset.(now) for the context's current instant and (default-time-zone) for its zone. In system-context mode the MCP server supplies both; otherwise pass explicit now and defaultTimeZone inputs.evaluate_date_expression with the expression.Send one expression:
{
"expression": "(add 2025-01-31 P1M)"
}
Optional explicit context fields are:
{
"expression": "(add 2025-01-31 P1M)",
"now": "2025-01-01T00:00:00Z",
"defaultTimeZone": "UTC",
"defaultCalendar": "iso8601"
}
(now) reads now, and (default-time-zone) reads defaultTimeZone. defaultCalendar is validated and reported but is not implicitly applied by current operators. Explicit fields override defaults supplied by system-context mode.
Temporal literals are unquoted and self-describing:
2025-01-31 date
2025-06-01T12:00:00Z instant
2025-06-01T08:00:00-04:00[America/New_York] zoned date-time
P1M duration
PT24H duration
-P2D negative duration
Quoted values are strings. For example, P1M is a duration but "P1M" is a string.
A zoned date-time must include both an offset and a bracketed zone identifier. Do not provide only a local date-time and zone name.
(add 2025-01-31 P1M)
(subtract 2025-03-03 P2D)
subtract always means left minus right. Subtracting two compatible Temporal values returns a duration:
(subtract 2025-03-03 2025-03-01)
; P2D
(subtract 2025-03-01 2025-03-03)
; -P2D
Use unit options when the representation matters:
(subtract 2025-12-31 2025-01-01 :largest-unit "months")
; P11M30D
Do not use until or since; they are not DSL operators.
(to-date (with-time-zone (now) (default-time-zone)))
If this returns MISSING_CONTEXT, pass explicit now and defaultTimeZone tool inputs or tell the user that the MCP server must be started with timecalc mcp --system-context. Never guess the current time or zone. Even when system context is available, ask for the user's zone when the request specifically depends on the user's location.
(with-time-zone 2025-06-01T12:00:00Z "America/New_York")
Arguments can be expressions:
(day-of-week (add 2025-01-31 P1M))
(add 2025-01-01 (subtract 2025-01-03 2025-01-01))
For a zoned date-time, P1D is one calendar day while PT24H is exactly 24 elapsed hours. They can produce different local times across daylight-saving transitions:
(add 2025-03-08T12:00:00-05:00[America/New_York] P1D)
; 2025-03-09T12:00:00-04:00[America/New_York]
(add 2025-03-08T12:00:00-05:00[America/New_York] PT24H)
; 2025-03-09T13:00:00-04:00[America/New_York]
Choose the duration that matches the user's intent. If intent is unclear, ask whether they mean a calendar day or 24 hours.
Successful tool results include text and typed structured content. Prefer structuredContent when another calculation or typed response follows:
{
"ok": true,
"type": "date",
"value": "2025-02-28",
"calendar": "iso8601"
}
Preserve zone, offset, calendar, and evaluation-context metadata when relevant. In particular, use the returned context.now and context.defaultTimeZone to state what “now” or “today” meant. In system-context mode the clock is captured once per evaluation, so repeated (now) calls in one expression use the same instant; a later tool call may use a later instant. Do not strip a named zone from a zoned result or present an instant as local time without an explicit conversion.
For detailed operator signatures, options, and error handling, read references/dsl-reference.md.
When translating a question into SQL over time-series data (TimescaleDB, PostgreSQL timestamptz tables), read references/timescaledb.md and resolve the time window to explicit instants before writing the query.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub timescale/timecalc-mcp --plugin timecalc