What Is With American Dates

Why can't the US wean themselves off the lamest date stamp in the world?


Is that y/m/d, d/m/y, or m/d/y?

It's mm/dd/yy, the same as it has been written for some time: January 12th, 2004. You mean "12th of January, 2004", right?

Keep Imperial measures, but switch to an ISO or metric date please.

Right away, sir.

And while we're at it, would you have us write numbers like this, too? 1.000.000,23

We could use Swatch InternetTime.

The problem with the format, concerning programmers, is that is doesn't sort properly. Thus we need to do lots of string fiddling or library handling, instead of a simple string comparison such as:

if "20040612" > "20040312" then ....

While we're at it, let's fix name conventions. It is a pain to try and sort names in First Middle Last format. We can adapt what some Asian cultures do and have names as Last First and skip the whole Middle thing. Everything should be made easier for the programmers.

Most places that have to sort names DO store names last-name first. Programmer, Joe The.

Speaking as an American, sometimes JustaProgrammer, I like the format just fine. It's just a stupid string though. You could do something like:

    y_offset = 0;
    y_len = 2;
    if( substring(date, y_offset, yLen) > substring(date2, y_offset, y_len)) ....
Of course, you could then generalize this by having a class for whichever system you're using... oh wait, this is already in most major programming language libraries! Granted, in many cases its recoded to UnixTime, but that's another issue.

-- WyattMatthews

Hmmm, sarcasm ...

The solution to this "problem" is for the programmer who wants to use and exchange dates from different sources and in different formats, to convert the day, month and year to their own "Universal" format for manipulation. Then he/she/they may use the date in the desired format and then convert to/from the format custom of the intended users. This "SimpleMinded" solution allows both programmer and user satisfaction. Illustrates: SimplifyByConversion? -- DonaldNoyes

The "Universal" format will typically support date calculations, which are often needed.

When I saw the title to this page, my first thought that some one not native to our fine republic had been jilted by a local lass, and created this page to complain ... but now I see it is about ways of presenting the state of the calendar and the clock.


Would someone braver than I care to refactor this page to keep the frustration but remove the bitterness?

What's the difference, exactly?

The problem I have with either the mm/dd/yy or dd/mm/yy formats is that it's often quite hard to decide which one it is. Especially if you're given a form to fill in that says 'date' and has room for three sets of two digits. Which way round do you do it? When doing real-life things like filling in a cheque I'll often write out the abbreviated month in letters to try to be clear. I suspect that yyyymmdd would confuse non-programmers more than my confusion.

The problem with the format, concerning programmers, is that is doesn't sort properly.

As a string, this is true.

I don't store my dates as strings, but as either integers or some other numeric, so sorting and indexing just works. The strings are a matter of presentation.

I agree that American date strings can be a problem in pipelines, but the RegularExpression for that is tattooed somewhere in the nerve bundles for my fingers.

I put it to the group that MM/DD is the more appropriate scheme, rather than DD/MM. Why? 'Cause MM/DD is short for YYYY/MM/DD, the ISO 8601 standard ordering (although the ISO standard separator is actually a hyphen). In real life, I use YYYY/MM/DD whenever there might be any confusion, and MM/DD the rest of the time. -- MikeSmith

CategoryTime CategorySimplification CategoryDefinition

EditText of this page (last edited August 13, 2013) or FindPage with title or text search