ISO 8601 — International standard for representing dates and times
ISO 8601 specifies an unambiguous, machine-friendly format for dates, times, combined date-times, time zones and week or ordinal dates used widely in computing and data exchange.
ISO 8601 is an international standard that defines how to represent dates and times in a consistent, machine-readable way. Its central idea is to arrange components from the largest to the smallest unit — year, month, day — so that a textual representation sorts in the same order as calendar time. That property makes ISO 8601 particularly useful for filenames, logs, data interchange, APIs and databases.
Image gallery
3 ImagesBasic principles and common forms
The standard provides several related notations. The most familiar is the calendar date in year–month–day order, written in extended form with hyphens as YYYY-MM-DD, for example 2022-11-10. A corresponding time of day is written in hours, minutes and seconds as hh:mm:ss, for example 17:36:00. To combine date and time, a capital letter T separates them: 2022-11-10T17:36:00. A UTC time may be indicated with the letter Z, and local times can include numeric offsets such as +02:00.
Variants and special formats
- Extended vs basic: Extended forms use separators (hyphens and colons) for readability; basic forms omit them (YYYYMMDD, hhmmss).
- Ordinal dates: A year with a day-of-year count, written as YYYY-DDD (e.g., 2022-314 for the 314th day).
- Week dates: Year with ISO week number and weekday as YYYY-Www-D (e.g., 2022-W45-4), used in business planning and production calendars.
- Reduced precision: The standard allows truncated forms like YYYY-MM or just YYYY when full precision is unnecessary.
History and development
ISO 8601 was developed to avoid ambiguity in international communication and to provide a canonical ordering for date-time strings. It was first published by the International Organization for Standardization and later revised and updated to cover additional scenarios such as week numbering, time zone offsets and fractional seconds. Its adoption has grown with computing and networked systems that exchange time-stamped information.
Practical importance and uses
Because ISO 8601 strings sort lexically in chronological order, they are ideal for filenames, log entries, database keys and APIs where consistent ordering matters. Many programming languages and libraries provide parsing and formatting routines for the standard. It is also commonly used in standards for data interchange (for example, in XML, JSON timestamps and many internet protocols).
Adoption and considerations
Although ISO 8601 is widely used in computing and formal documentation, everyday human conventions for writing dates vary by region. Some countries and cultures use day–month–year or month–day–year in daily life, while many East Asian systems follow year–month–day, which coincides with ISO ordering. See the note on sorting and lexical order via sorting behavior and regional practice at regional date formats.
When working with ISO 8601, be explicit about time zones and precision. Use extended notation for readability unless a compact form is required, and prefer including the time zone indicator (Z or an offset) when timestamps cross regions. These simple practices make date-time data portable, unambiguous and easier to automate.
Questions and answers
Q: What is ISO 8601?
A: ISO 8601 is an international standard that describes dates and times in a way that is easy for computers to understand.
Q: How is the ISO 8601 standard based on putting the numbers?
A: The ISO 8601 standard is based on putting the biggest types of numbers first and the smallest numbers last.
Q: What is the order of YEAR-MONTH-DAY in the ISO 8601 format?
A: The order of YEAR-MONTH-DAY is used in the ISO 8601 format.
Q: What does a basic ISO date for today look like?
A: A basic ISO date for today looks like 2022-11-10.
Q: How is the ISO 8601 dates put in alphabetical order?
A: When a computer or human puts ISO 8601 dates into alphabetical order, they are also in chronological order.
Q: Is it common for people in any country to write dates using this standard in their day-to-day lives?
A: No, it is currently not common for people in any country to write dates using this standard in their day-to-day lives, but many Asian countries follow YEAR-MONTH-DAY order.
Q: What is the basic ISO time?
A: The basic ISO time is 17:36.
Related articles
Author
AlegsaOnline.com ISO 8601 — International standard for representing dates and times Leandro Alegsa
URL: https://en.alegsaonline.com/art/48474
Sources
- tools.ietf.org : "RFC 6350 - vCard Format Specification"
- iso.org : Numeric representation of Dates and Time