Intended market: XHTML/HTML coders (using editors or scripting), script designers (PHP, JSP, etc.), internet project supervisors, and whoever would like to learn how to manage date that is international.
People to a site from varying locales might be confused by date platforms. The MM/DD/YY that is format is into the united states of america (but often utilized in Canada, too, which could clearly create some confusion there). The majority of European Countries makes use of DD/MM/YY. Japan utilizes YY/MM/DD. The separators could be slashes, dashes or durations. Some locales printing leading zeroes, other people suppress them. If a native speaker that is japanese reading a US English web site from an internet site in Germany which has the date 03/04/02 how can they interpret it?
Your very first impulse can be to assume this issue should be cared for during localization of this website pages – i.e. allow the translator correct it. Resist this impulse. You don’t wish to keep split copies of papers when it comes to U.S. plus the U.K. that differ only in date structure? In just about any instance you’ve kept to cope with multilingual users just like the one in our example above.
You have got three choices to think about, all with advantages and disadvantages:
- Make use of a locale basic structure
- Result in the and year obvious month
- Make use of the Accept-Language HTTP header
Choice One: make use of a locale basic format
ISO 8601 specifies a structure of YYYY-MM-DD. 2003-04-02 is better than 03/04/02. (Some would like to change ISO 8601 simply by using an abbreviation when it comes to to allow it to be more clear, for instance 2003-Apr-02, then again it really is no more locale basic.) thirty days. (more…)