ISO 8601 Date Format Tool
The ultimate ISO 8601 developer suite. Generate, parse, validate, and convert ISO dates, durations, and intervals. Includes code snippets for 20+ languages.
Construct a period vector to add to a date. E.g., "1 Year and 2 Days".
About
Time is not a flat circle; in software engineering, it is a complex linear vector fraught with ambiguity. The ISO 8601 standard is the internationally accepted solution for the representation of dates and times. It eliminates the confusion of local formats (e.g., 01/02/03 - is that Jan 2nd, 2003, or Feb 1st, 2003?) by enforcing a strict big-endian lexicographical order: Year, Month, Day, Hour, Minute, Second.
For systems architects and developers, adherence to ISO 8601 (and its internet profile, RFC 3339) is non-negotiable for API design, database storage, and log serialization. This suite goes beyond simple conversion. It provides a rigorous environment to generate compliant strings, calculate P (Period) durations, validate intervals, and generate the specific parsing code required for your tech stack, from Python to Rust. It handles the mathematical nuances of offsets, ordinal dates, and the precise syntax of delimiters.
Formulas
The construction of an ISO 8601 string follows a strict concatenation logic. For a global timestamp with offset, the mathematical structure is:
Where the Offset is defined by the difference between Local Time and UTC:
Calculating the Ordinal Day (doy) from a standard date involves summing the days of preceding months. Let M be the month index (1-12) and D be the day of the month:
For Durations, the operation is vector addition, not scalar addition. Adding P1M (1 month) to 2024-01-31 yields 2024-02-29 (leap year), while adding it to 2023-01-31 yields 2023-02-28. The magnitude of P1M changes based on the starting operand.
Reference Data
| Format Name | Pattern Structure | Example Value | Context & Usage |
|---|---|---|---|
| Extended Date | YYYY-MM-DD | 2025-10-31 | Standard storage format. Requires hyphens. |
| Basic Date | YYYYMMDD | 20251031 | Legacy systems, filenames, compact storage. |
| UTC Timestamp | DateTTimeZ | 2025-10-31T14:30:00Z | Absolute time. Z indicates Zero offset (Zulu). |
| Offset Timestamp | DateTTime±hh:mm | 2025-10-31T09:30:00-05:00 | Local time with explicit deviation from UTC. |
| Week Date | YYYY-Www-D | 2025-W44-5 | Commercial/Fiscal calendars. Week starts Monday (1). |
| Ordinal Date | YYYY-DDD | 2025-304 | Mainframes, compact systems. Day of Year (1-366). |
| Duration (Full) | PYYMMDDThHmMsS | P1Y2M10DT2H | Vector of time. P=Period, T=Time separator. |
| Duration (Week) | PwW | P4W | Duration expressed purely in weeks. |
| Interval (Start/End) | Start/End | 2024-01-01/2025-01-01 | Span between two instants. |
| Interval (Start/Dur) | Start/Duration | 2024-01-01/P1M | Recurring events or defined validity periods. |
| High Precision | ....ssssss | ...14:30:00.123456 | Microseconds/Nanoseconds (Implementation specific). |
| Reduced Precision | YYYY-MM | 2025-10 | Specific month, day unknown or irrelevant. |