I'll grant you that the study I am proposing will not be thrilling.
It will at least give us a chance to get familiar with standards for dates and related matters. And perhaps to notice that we (myself first, on this site) are not always very respectful of what ought to be “the proper way of doing things”.
A bit of history
ISO (International Organization for Standardization) officially came into being on 23 February 1947 from the merger of two organizations.
One was ISA (International Federation of the National Standardizing Associations) which, although based in New York, had an area of activity largely limited to continental Europe.
The other was UNSCC (United Nations Standards Coordinating Committee), administered from London.
At a conference bringing together all member countries of both organizations (25 countries represented by 65 delegates), held at the Institution of Civil Engineers in London on 14 October 1946, the decision was made to create a new organization. Its purpose would be to “facilitate the international coordination and unification of industrial standards”.
Why ISO? It is often said to come from the Greek isos, meaning “equal”. Willy Kuert, the Swiss delegate at the 1946 London conference, stated that “this aspect was never brought up at any time in London”. So, it is ISO and that is that. And it is ISO in every country in the world. At the very least, that is what one can expect from an organization in charge of standardization.
Where is ISO headquartered? It nearly ended up in Paris, but in the end, by a single vote during the London meeting, Geneva was chosen.
It was in 1946 that Geneva was designated as ISO's headquarters.
In 1956, ISO moved to Rue de Varembe, and has since moved again to a brand-new building at 8 Chemin de Blandonnet in Vernier, Switzerland.
How does ISO work?
ISO is a non-governmental organization. It therefore has neither the mission nor the power to force the application of a standard. Its mission is to build consensus around solutions in response to requests. But make no mistake: these requests are serious, and compliance with standards by a given country is a mark of reliability and quality.
Through its Central Secretariat in Geneva, ISO coordinates a network of national standards bodies currently spanning 146 countries. Each country is represented by one member.
Each member may participate in drafting any standard it considers necessary for its country and has one vote regardless of country size. At last, an organization where equality is not just an empty word.
How many standards are created?
Since 1947, ISO has published more than 13,700 international standards. Every field is concerned:
“Excerpt from an ISO text: Without standardized dimensions for freight containers, international trade would be slower and more costly. Without standardization of phone and bank cards, life would be more complicated. The absence of standardization can even affect quality of life itself, for example for people with disabilities, if they cannot access consumer products, public transport and buildings because wheelchair and doorway dimensions have not been standardized.
Even in areas where we would least expect it: "The standardization of screw threads helps the proper assembly of chairs, children's bicycles or aircraft and solves repair and maintenance problems once caused by lack of standardization, which used to be a real headache for manufacturers and users alike."
If you are looking for the list of published standards, it is here.
How does a standard come into being?
When certain industrial, technical or economic sectors see value in creating a standard, they inform a national ISO member, which then submits the request to ISO. ISO evaluates the relevance of the request and either accepts or rejects it.
If accepted, the standard is assigned to an existing technical committee, or a new one is created.
The requested standard is drafted by a technical committee made up of experts in the field. Other specialists may be involved. The experts, selected by the ISO member body of the country concerned, take part within national delegations and, always in the spirit of equality, these delegations must represent the interests of all stakeholders.
National expert delegations meet until they reach consensus on a draft agreement.
This draft is circulated (DIS = Draft International Standard) to all ISO members for review, comments and voting. If that vote is favorable, the document and any amendments are then circulated (FDIS = Final Draft International Standard) for another vote. If approved, the document is published as an International Standard.
Finally, note that AFNOR is ISO's French member body (among other roles) and carries out the responsibilities assigned to France in that capacity.
The French Association for Standardization was created in 1926; it is recognized as serving the public interest and placed under the authority of the ministry in charge of industry. It has around 3,000 member companies.
To learn more about AFNOR, click here.
The ISO 8601 standard
If we wanted to be more precise, we should write ISO 8601:2000. Indeed, the 2000 “version” incorporates earlier standards (ISO8601:1988) plus additional elements.
Its title is: Data elements and interchange formats - Information interchange - Representation of dates and times.
Many countries adopted this standard under their own references. Here is a non-exhaustive list (thanks to Ian Galpin and his information):
- South Africa: ARP 010:1989.
- Australia: AS 3802:1997.
- Canada: CSA Z234.5:1989.
- Japan: JIS X 0301-1992.
- European Standard: EN 28601:1992.
- USA Standard: ANSI X3.30-1985(R1991) and NIST FIPS 4-1.
And, for European countries applying EN 28601:
- Germany: DIN EN 28601 (1993) & DIN 5008 (1996).
- Austria: OENORM EN 28601.
- Belgium: NBN EN 28601 (1993).
- Denmark: DS/EN 28601.
- Spain: UNE EN 28601.
- Finland: SFS-EN 28601.
- France: NF EN 28601 (1993).
- Greece: ELOT EN 28601.
- Netherlands: NEN ISO 8601 (1994) & NEN EN 28601 (1994).
- Iceland: IST EN 28601:1992.
- Ireland: IS/EN 28601:1993.
- Italy: UNI EN 28601 (1993).
- Luxembourg: ITM-EN 28601.
- Norway: NS-ISO 8601.
- Poland: PN-90/N-01204.
- Portugal: EN 28601.
- Czech Republic: CSN EN 28601.
- United Kingdom: BS EN 28601:1992 (replaces BS 7151).
- Sweden: SS-EN 28601 (1991).
- Switzerland: SN-EN 28601-1994.
Contents of ISO8601:2000
This standard covers the following elements:
- Date
- Time of day
- Coordinated Universal Time (UTC)
- Local time with time-zone offset
- Date and time
- Time intervals
- Recurring time intervals
I will try to present these elements in table form. You are lucky: you only have to look at the part that interests you. I, on the other hand, have to go through the whole thing! Well, perhaps not all of it, because I will allow myself to do a little trimming and keep only useful elements to simplify the rest.
Three remarks before we tackle the table:
1) Most elements have a basic representation and an extended representation to improve readability.
2) I keep the abbreviations in English, so:
“Y = year
Z = UTC indicator
M = month
D = day
w = week
h = hour
m = minute
s = second
n = positive integer digit or zero
P = time interval
R = recurring interval indicator
T = separator between date and time elements
3) The standard uses the Gregorian calendar, and weekday numbering is defined as follows:
| Rank | Day |
|---|---|
| 01 | Monday |
| 02 | Tuesday |
| 03 | Wednesday |
| 04 | Thursday |
| 05 | Friday |
| 06 | Saturday |
| 07 | Sunday |
The week is identified in the year by a number. The first week of the year (week 1) is the one containing the first Thursday of the year. The last week of the year is the one preceding the first week of the next year. In other words, the first week of the year is the one containing 4 January.
For the rest:
| Element | Basic format | Extended format | Notes |
|---|---|---|---|
| DATES | |||
| Current date | YYYYMMDD 20030607 |
YYYY-MM-DD 2003-06-07 |
7 June 2003 |
| Current date reduced to month | YYYY-MM 2003-07 |
none | |
| Year | YYYY 2003 |
none | |
| Century | YY 20 |
none | I can live with it, but... |
| Current date | YYMMDD 030607 |
YY-MM-DD 03-06-07 |
current century |
| Current date reduced to month | -YYMM -0306 |
-YY-MM -03-06 |
current century |
| Year | -YY -03 |
none | current century |
| Day of month | --MMDD --0607 |
--MM-DD --06-07 |
current year |
| Month of year | --MM --06 |
none | current year |
| Day of month | ---DD ---07 |
none | current month |
| I am skipping years beyond 9999. We will have time to come back to that when we get there!! | |||
| Ordinal date | YYYYDDD 2003157 |
YYYY-DDD 2003-157 |
157th day of year 2003 = 7 June 2003 |
| Ordinal date | YYDDD 03157 |
YY-DDD 03-157 |
current century |
| Current day of year | -157 | none | single hyphen |
| Week date | YYYYWwwD 2003W237 |
YYYY-Www-D 2003-W23-7 |
7th day of week 23 in year 2003 |
| Year, week, day | YYWwwD 03W237 |
YY-Www-D 03-W23-7 |
current century |
| Year and week | YYWww 03W23 |
YY-Www 03-W23 |
current century |
| Year, week and day | -YWwwD -3W237 |
-Y-Www-D -3-W23-7 |
year in current decade |
| Year, week | -YWww -3W23 |
-Y-Www -3-W23 |
year in current decade |
| Week, day | -WwwD -W237 |
-Www-D -W23-7 |
current year |
| Week | -Www -W27 |
none | current year |
| Day | -W-D -W-5 |
none | current week |
| TIMES OF DAY | |||
| Local time | hhmmss 151225 |
hh:mm:ss 15:12:25 |
|
| Hours and minutes | hhmm 1512 |
hh:mm 15:12 |
|
| Hour | hh 15 |
none | |
| Hours, minutes, decimal seconds | hhmmss,s
s
151224,5 |
hh:mm:ss,s
s
151224,5 |
|
| Hours, decimal minutes | hhmm,m
m 1512,8 |
hh:mm,m
m 15:12,8 |
|
| Decimal hour | hh,h
h
15,25 |
none | |
| We are not going to dwell on reduced time format. You already understand that you just replace the missing element with a hyphen (-). Same principle as for dates. | |||
| Midnight | 000000 | 00:00:00 | start of a day |
| Midnight | 240000 | 24:00:00 | end of a day |
| UTC time | hhmmssZ hhmmZ hhZ |
hh:mm:ssZ hh:mmZ hhZ |
Same format as local time. Add Z at the end. |
| Local time - UTC offset | ±hhmm ±hh |
±hh:mm |
corresponds to the time zone: +0100 for example |
| Local time + time-zone correction | hhmmss±hhmm hhmmss±hh |
hh:mm:ss±hh:mm hh:mm:ss±hh |
example: 15:12:15+01:30 |
| Date and time: simply write the date in one of the formats above and add time in one of the time formats. The date part and time part are separated by a T. See below. | |||
| Date and time | YYYYMMDDThhmmss YYYYMMDDThhmmssZ YYYYMMDDThhmmss±hhmm YYYYMMDDThhmmss±hh |
YYYY-MM-DDThh:mm:ss YYYY-MM-DDThh:mm:ssZ YYYY-MM-DThh:mm:ss±hh:mm YYYY-MM-DDThh:mm:ss±hh |
|
Intervals: simply indicate the starting instant (date, date-time...) then a separator / then the ending instant (date, date-time...), which can give, for example: YYY-MM-DDThh:mm:ss/YYY-MM-DDThh:mm:ss
To define interval duration rather than start and end dates, just indicate that it is an interval by using prefix P.
Example: P5Y6M3DT15H10M20S (5 years 6 months 3 days 15 hours 10 minutes 20 seconds). Do not forget the P to indicate this is a time interval.
P7W: 7 weeks.
Of course, nothing prevents you from mixing start date and duration, or duration and end date.
For example, 2003-06-06T12:00:00/P0Y0M0DT00:03:00 means that an egg whose cooking starts on 6 June 2003 at noon will be cooked three minutes later. Soft-boiled, of course!
And nothing stops you from writing 2003-06-06T12:00:00/2003-06-06T12:03:00. The result is the same.
If you want longer cooking, write 20030606T120000/20030606T120300 because by the time you decipher it... the three minutes will already be over!