Articles

Articles

Calendar on wall

Photo by Maddi Bazzocco on Unsplash

ISO 8601

By Bruce Webber
Posted 2020-09-12 in general


You may have noticed that all dates on this website have the format YYYY-MM-DD (for example, 2020-09-12). This is in accordance with the ISO 8601 standard. ISO is the International Organization for Standardization, which publishes standards for a variety of domains, including information technology, quality and the environment.

The ISO 8601 standard applies to dates and times. One of the principles of ISO 8601 is that larger units of measure precede smaller units of measure. The year appears before the month, which appears before the day. Leading zeroes are included to make the lengths of the parts consistent.

One advantage of this standard is that file names containing dates sort correctly. For example, if today's TPS report is called TPS-report_2020-09-012.doc, and other TPS reports are similarly named, they will sort correctly.

People in the US may write today’s date as 9/12/2020 (or 9/12/20). People in Europe may write it as 12.9.2020 (or 12.9.20). Dates written in these formats won't sort correctly. They will end up being grouped by month in the US format, and by day of month in the European format.

You can learn more about the ISO 8601 standard from this Wikipedia article.

xkcd (“a webcomic of romance, sarcasm, math, and language”) points out that having a variety of date formats is confusing:

Please follow the ISO 8601 standard to make our lives easier.