Thursday, March 18, 2010

Using the Wrong Date Formatting and the Global Problem — ISO8601

November 10, 2008 by Greg Ferro · 3 Comments 

When work­ing in a global com­pany, a major prob­lem is the way that some coun­tries use the wrong date format­ting. Say hello to ISO8601, stand­ard for date formats.

You have to think global these days. — etherealmind

Most coun­tries use the day /​ month /​ year, but a few coun­tries use month /​ day /​ year. This causes major prob­lems in doc­u­ment­a­tion (at least) when one group is refer­ring to 12 (1st February) and the other group 21 (2nd January).

My per­sonal fix for this has been to use year /​ month /​ day. But my main reason has been to organ­ise files in date order and get use­ful dir­ect­ory listing. date-iso-1.jpg

ISO Standard

I recently dis­covered that there is an ISO stand­ard for lay­ing out dates in exactly this man­ner. ISO8601 was pub­lished in 1988, and updated in 2004 and is avail­able ISO8601 at Wikipedia.

Calendar Date

Calendar date is the most com­mon date rep­res­ent­a­tion. It is:

YYYY-MM-DD

where YYYY is the year in the Gregorian cal­en­dar, MM is the month of the year between 01 (January) and 12 (December), and DD is the day of the month between 01 and 31.

Example: 2003-​​04-​​01 rep­res­ents the first day of April in 2003.

Time of Day

Time of the day is the time rep­res­ent­a­tion, using the 24-​​hour time­keep­ing sys­tem. It is:

hh:mm:ss

where hh is the num­ber of com­plete hours that have passed since mid­night, mm is the num­ber of com­plete minutes since the start of the hour, and ss is the num­ber of com­plete seconds since the start of the minute.

Example: 23:59:59 rep­res­ents the time one second before midnight.

Date and Time

Date and time rep­res­ents a spe­cified time of a spe­cified day. When use is made of the cal­en­dar date the rep­res­ent­a­tion is:
YYYY-MM-DDThh:mm:ss

where the cap­ital let­ter T is used to sep­ar­ate the date and time com­pon­ents. Thus, for a very pre­cise date and time, look at this:

Example: 2003 – 04-01T13:01:02 rep­res­ents one minute and two seconds after one o’clock in the after­noon of 2003-​​04-​​01.

Conclusion

If you are writ­ing doc­u­ments that you are going to send to a Global Audience, this is a good stand­ard to use. Because the YEAR is the first num­ber, it is imme­di­ately obvi­ous that the date format is dif­fer­ent to what you were taught at school, and it is obvi­ous what the format means.

I would like to see every­one adopt this stand­ard, and make my life sim­pler. It seems every other week I have a fel­low worker in the USA who gets the date mixed up because they use dif­fer­ent format by default. ISO 8601 means that both parties have to change and this works well in terms of gain­ing acceptance.

I hope you think so too.

Footnote

Note that you should only use the format YYYY /​ MM /​ DD to ensure Y3K or turn of the cen­tury problems.

Please rate this post:

  Why Rate Posts?
1 Star - It\\\'s Crud2 Stars - It\\\'s Tosh3 Stars - Something\\\'s missing4 Stars - Needs works5 Stars - Good Enough6 Stars - Good7 Stars - Excellent8 Stars - Brilliant9 Stars - Astonishing10 Stars - Awesomely Godlike? (No Ratings Yet)
Loading ... Loading ...

Comments

3 Responses to “Using the Wrong Date Formatting and the Global Problem — ISO8601”
  1. Francois says:

    Nice to know, thanks Greg

  2. Onur says:

    Hi;

    Thanks for this info. One of the things that amused me when I first moved to Sweden was that their date format is YYYY-​​MM-​​DD. I guess they were just fol­low­ing standards.

  3. David Bass says:

    I love this entry, man, it reminds me of so much about what human might mean some day! To elab­or­ate on this grand notion…I was recently in the US and whenever I have vis­ited I get the imp­pres­sion that some folks over the pond may “for­get” that their lives are actu­ally con­nec­ted to the lives of oth­ers. I reckon this hap­pens to people over this side of the pond some­times, and maybe elsewhere…I don’t know. Your art­icle about the time and date is sug­gest­ing (it seems to me) that we all need to make an effort to change in order to meet in the middle…hmmm YEAH…Go for it!

    I need to add here, that there are loads of neat things about the US too, in fact I am a fan of a lot of things, I have some way cool fam­ily and friends; it’s a really go get it place, and prob­ably a lot of folk in the US will wel­come your suggestion…any responses?

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!