Pages

2011-01-21

They're running on metric time!

"Now, to make dates alphabetically sortable, the most significant component must be the first. This would be the year. By the same argument, the next component must be the month, and so forth. Again, to make sorting possible, all components of the date must be equally long, so months and days are zero-padded (“06” instead of just “6”, etc), and the year is always specified with 4 digits (this also avoids any Y2K-related problems). In total, the format looks like this:

YYYY-MM-DD

Some examples:

* 2005-12-31
* 2006-03-30
* 2007-02-02
* 2008-01-21

Now, isn’t that just a thing of beauty? No longer will any date be ambiguous, and if you use this format, any program that provides alphabetical sorting (which should be pretty much any file manager) will be able to sort your folders correctly."

http://christianiversen.dk/blog/theyre-running-on-metric-time

No comments: