Formatting dates and times can be a tricky task. Different countries utilize different formatting, making it confusing to localize dates and times. To make matters more complex, certain countries, like Canada, combine different formatting conventions.
Here are some considerations to take when formatting dates and times for different audiences.
The Problem With Localizing Dates
Different locales have different preferences for how to display dates and times. While they could look similar, the differences can be significant.
For example, the US American date format looks like: 12/29/2021 (MM/DD/YYYY). On the other hand, the British-English format switches the month and the days: 29/12/2021 (DD/MM/YYYY).
While the example above makes it clear which number refers to the day and which refers to the month (since 29 cannot possibly refer to a month), the following instance is not so clear:
- US American: 10/08/2021
- British-English: 08/10/2021
As you can see, the dates above can cause confusion. Is the date October 8th, 2021 or is it August 10th, 2021? Well, that depends if you’re following the US American or British-English formatting.
Date Formatting in Different Countries
The US American and British-English formatting is just the tip of the iceberg. There are even more formatting conventions with different countries. Here are some other common date formats in various parts of the world:
- Canada: YYYY-MM-DD (i.e. 2021-10-12)
- Italian: DD.MM.YY (i.e. 12.10.21)
- Thai: DD/MM/YYYY (i.e. 12/10/2021)
- Spanish: DD-MM-YYYY (i.e. 12-10-2021)
Even amongst these nations, there are variances and exceptions to these formatting conventions. This is why it is often confusing to localize dates.
There are not as many variations on the convention for time, making it less confusing. There are generally two accepted formats:
- 24-hour format: This format starts out with the hour and then the minutes. When it starts with a ‘0,’ it means it is morning. For example, 02:23 would mean 2:23 in the morning. Most non-English speaking countries use this convention.
- 12-hour format: The 12-hour format only goes up to the digit 12. It distinguishes morning and night with the Latin abbreviations AM and PM. For example, 2:23 AM. Most English-speaking nations (i.e. USA, Canada, and Australia) use this convention.
Using the ISO 8601 Date and Time Formatting
ISO 8601 is an international standard developed to help maintain consistency in date and time formatting. This standard is becoming more popular, with many countries adopting it as their primary convention.
For dates, ISO 8601 formatting is: YYYY-MM-DD (i.e. 2021-11-20).
For times, ISO 8601 formatting is: hh:mm:ss
This notation makes it easier for translation and localization purposes. There is no need for translating text string (i.e. ‘DEC’ or ‘FEB’, etc.). It is easy to read and understand. And, finally, this notation is widely used by other nations already (i.e. Korea, Sweden, Finland, Denmark, etc.).