Archive for the ‘Standards’ Category

21
Dec

UTC Time

   Posted by: Rick Lord

Since it’s my mission in life to convert the world to using UTC time (For those that would hold that against me later, I say that with a little bit of sarcasm) I’ve added a UTC date and time clock to the sidebar of this page.

22
Jan

Date Formats

   Posted by: Rick Lord

The basic standard date format is YYYY-MM-DD, where YYYY is the four digit year, MM is the two digit month and DD is the two digit day. This is specified by ISO-8601. The standared does describe alternatives such as omitting the hyphens but this is the basic standard. It also allows the use of a two digit year, which I disagree with. In fact, the W3C (the group responsible for web standards) seems to feel the same way. Their standard date format is similar to ISO-8601 but stricter and insists on four digits years.

Let’s discuss why a standard date format is important. Let’s use an example. 1/9/05. What date do you think this is? If you’re in the U.S. you probably would say January 9th, 2005. If you are in the U.K. you probably would say September 1st, 2005. Do you know where I’m from? If not then you have no way of knowing what I mean by 1/9/05. So it can create a lot of confusion. It gets more complicated than that but I think that is enough to make my point.

Here’s another example. I see this all the time at work. Somebody will make a copy of a spreadsheet so they can have a snapshot of it on that date. They will name it with the date code in the filename. Here’s an example of a directory of such files.

  • something_030504.xls
  • something_051605.xls
  • something_061204.xls
  • something_082304.xls

First you need to figure out what date format we are using. Since the middle set of numbers is greater than 12 in the third and fourth examples we know that that is the day. But there is no way of knowing which part is the year. Well, in this example the format is MMDDYY (Month, Day, Year). The problem with that is the most recent file is the second one in the list because the files are sorted by name. A better but still clunky solution is to use the format YY-MM-DD (Year, Month, Day). Then they are sorted correctly. It becomes a huge mess when you have multiple people creating these files and some use the MMDDYY format and others use YYMMDD. What’s the solution YYYYMMDD. The four digit year eliminates confusion between month and year. It’s still possible for someone to swap month and day but I’ve never seen anyone use the format YYYYDDMM. With YYYYMMDD you eliminate confusion and the files are sorted
correctly when sorted by name. Oh yeah, it also follows the standard. Imagine that.

21
Jan

First Day of the Week

   Posted by: Rick Lord

The international standard for first day of the week is Monday as specified by ISO-8601. Yet the United States, and I’m sure several other countries, still cling to Sunday as the first day. It doesn’t make sense to me that the last day of the weekend is the first day of the week. Notice the calendar front page of this site has weeks starting with Monday?

The world will be a much better place when all calendars start on Monday. At least it will be better for me and that’s all that really matters right?

21
Jan

Standards

   Posted by: Rick Lord

I started writing an entry about standards but it got to be a bit long. I’ve decided to break it up into sections and post it over several days. I’ve also added a category called for it. If you are a standards geek too you can go directly to the Standards category and bypass all of my mundane personal entries.