Date Formatting

Date formatting is not constant through out the world. Although each date basically displays the day, month, and year, their presentation order and separators vary greatly. In fact, there may be many differences between regions within the same country.


To help illustrate this, let's look at two basic date formats:

Long Date (Tuesday, October 12, 1954)
Short Date (10/12/54)

Now let's compare these formats between US-English, Mexican-Spanish, and Japanese.

Long Date

English: Tuesday, October 12, 1954
Spanish: martes 12 de octubre de 1954
Japanese: 1954年10月12日

Obviously, the names of the months and days of the week are different from locale to locale. However, there are other notable differences as well. In Spanish, the day comes before the month, everything is lowercase and the article "de" has been added. In Japanese, the day of the week is not displayed, and the translations for day, month and year act more like separators.

Short Date

English: 10/12/54
Spanish: 12/10/54
Japanese: 54/10/12

In the short date, we again see that in Spanish the order is day/month/year as compared to the US where it is month/day/year. In Japan, the order is year/month/day. This can cause confusion if not watched carefully. For example, depending on which country you are in, the date specified as 07/04/01 could mean:

English: July 4th, 2001
Spanish: April 7th, 2001
Japanese: April 1st, 2007

These examples shows why you should use the date APIs when dealing with dates. Not only will they handle the correct format, but they will also display the correct translations for the long dates, thus saving translation costs.