Today is 2005-11-17

Consistent communication is something that gets my riled up sometimes. One item in particular bothers me more than most. The representation of dates.


What a mess. Thankfully, some smart people got together and decided that we should have a date format that can be used worldwide with consistent meaning.
ISO 8601 - Follow the link for a great explanation of it, but the main idea is YYYY-MM-DD. Always 4 digits for years. Always 2 digits for the month. Always 2 digits for the day. Just like numbers, the bigger unit is on the left. It all makes a lot of sense to me.

What doesn't make sense is how many companies today do business all over the world, yet still use the date format that is common in their region. I see documents at work sent to the UK with US style dates on them. That has to be annoying and confusing. Blogger won't let me choose this date format. Who knows why.
I even see people coding year logic based on 2 digits. Uhhh, did you sleep through the 99? Does Y2K mean anything to you? Sure, the world continued on 2000-01-01, but shouldn't we be preparing for 3000-01-01?

I'm doing my part. I tell anyone who will listen about ISO 8601. Most times I get the "you are nuts" look, but a few people have taken to it. I write the date on all of my checks this way. The bank has yet to complain. I also use this date format in documents and test data that I prepare at work. I haven't been told to stop, but I have had people edit my dates back to their favorite format. 2 steps forward, 1 step back I guess.


Samantha said...

I'll jump on the wagon. I really like this format idea at least for businesses because they could really benefit from it. One thing I'm not a fan of is the military time. I know it makes specifying am or pm unnecessary, but having used the common people 12 hour time my whole life I am less comfortable with the 24 hour version. This is just a personal preference, and change can be good, so I'm open to the possibilities.

crturboguy said...

Ryan, I think you know my thoughts on this, but if not, here they are anyway. :)

I used to be one of the 'are you nuts' people, but after having tried your way, I definitely like it much better, if for no other reason than it makes sorting data easier. Try sorting
It sucks, as most sort algorithms won't sort them 'properly', they go by strict number order. The ISO method makes that irrelevant.

And while we're on the subject of things that are annoying, spaces in file names. They drive me nuts. I know w/ 'modern' OS's, we probably should have to worry about it, but it's a heck of a lot easier when trying to type out a path to not have to escape it to allow for the spaces.


Jason said...

As an engineer, of course I agree with Ryan. How else can you logically sort dates in order? You can only do it if the values are placed left to right in order of potential and ordered increment.

As for Josh's thoughts, methinks you are not actually making use of your "modern OS". Use tab completion, it is your friend. However, that said, I do prefer underscores to spaces in names.

---ryan said...

I thought this might be useful. Here is the function I use in my windows apps to get the date/time.

CString getDateTime(void)
CTime now = CTime::GetCurrentTime();
CString dateString;