Scott's site: LaughingSquid.com
Search Pud:

Thursday, February 14, 2008

Date formats

Pud,

Why do Americans use the date format MM/DD/YYYY, while most everyone else uses DD/MM/YYYY?

It makes more sense to have it in ascending order, no?

Please advise,
Dobo
28 years old
Dublin, Ireland
Dobo,

You're on the right track, but the fact is that neither of those formats are optimal. There's only one efficient way to display a date, and that format is: YYYYMMDD.

And notice there are no separators between the years, month and day. When using this format, you don't need em. Just clump the values together like they're a big number, and dates can be easily understood and sorted.

For example, take three dates:
  • October 30, 1975 (my birthday)
  • September 24, 2004 (when I moved from NYC to San Francisco)
  • July 4, 1776 (independence day)
Written as YYYYMMDD, they can be easily sorted as regular numbers:
  • 17760704
  • 19751030
  • 20040924
No other regular date format can be compared, sorted, or understood this easily.

In programming, people often get around inefficient the date/time problem by not using dates or times at all. Instead, programmers go by the number of seconds since "Unix epoch," which is January 1, 1970 (UTC). Not counting leap seconds.

Time should really be counted this way. For example, right now the time is: 1,202,984,940 seconds since epoch.

Rock on,
Pud


Spottt Link Exchange


About Pud

Pud is an expert in many things including money, sex, business, arts, music, food, fashion, technology, nightlife, travel -- almost everything except sports.
Join my spam-free email list:

Latest Mobile Pics
Sent from my phone

Pud's...

Company: AdBrite
Book: F'd Companies
Speaking: Say hi!
MySpace: Befriend me
YouTube: My videos

Subscribe to my RSS feed.


Previous posts

Archives