time_iso_8601_formatter
Parse, format, and perform arithmetic on ISO 8601 and RFC 3339 dates, times, durations, intervals, and recurring intervals with strict validation.
Instructions
ISO 8601 / RFC 3339 Date Formatter. Parse, format, and do arithmetic on ISO 8601 / RFC 3339 dates, times, durations, intervals, and recurring intervals using a strict hand-rolled parser (the permissive native Date parser is deliberately avoided). The 'operation' field selects the mode: 'parse' decodes one ISO string into calendar/ordinal/week-date components, offset, epoch milliseconds, and UTC; 'format' renders date fields or a unix-ms value into a chosen ISO style; 'duration' normalises an ISO duration into canonical form, human text, and total seconds; 'add' applies a duration to a base instant with calendar-aware month wrapping; 'now' returns the current UTC instant. Use this for ISO/RFC string parsing and rendering, not time_timezone_converter (IANA zone-to-zone wall clock with DST), time_world_clock (live multi-city clock), or convert_timestamp (unix-epoch to human date). Pure read-only computation, no network or storage; only 'now' reads the wall clock. Rate limit 60 requests/minute per client (anonymo
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | Mode to run. 'parse' decodes an ISO string; 'format' renders to an ISO style; 'duration' normalises an ISO duration; 'add' adds a duration to a base instant; 'now' returns the current UTC instant (ignores all other fields). | parse |
| input | No | Operation payload. For 'parse' an ISO 8601 string (e.g. 2026-05-26T14:30:00+02:00, 2026-W22-2, P1Y2M3DT4H5M6S, or start/end). For 'format' a unix-milliseconds number or an object with year, month, day and optional hour/minute/second/ millisecond/offsetMinutes (or unixMs). For 'duration' an ISO duration string, a seconds number, or a duration object. Unused by 'add' and 'now'. | |
| style | No | Output style for 'format' only. 'rfc3339' forces a trailing Z when no offset is given. | extended |
| base | No | Base date or datetime for 'add' (ISO 8601). Must be a date or datetime, not a duration or interval. | |
| duration | No | ISO 8601 duration to add for 'add' (e.g. P1M, PT1H30M, -P10D). Leading minus subtracts. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | No | True when the operation succeeded. | |
| operation | No | The operation that was run (echoed back). | |
| result | No | Operation-specific output. parse returns input, kind (date/time/datetime/duration/interval/recurring), and optional date/time/offset/epochMs/utc/duration/ seconds/start/end fields. format returns iso. duration returns iso, human, seconds. add returns iso, utc. now returns isoUtc, isoLocalLike, epochMs. | |
| error | No | Error message when success is false. |