locale-dependent formatting of dates

tbecker - May 11, 2003 - 05:50
Project:Drupal
Version:6.x-dev
Component:locale.module
Category:feature request
Priority:minor
Assigned:Unassigned
Status:active
Description

In the US, most dates are MM/DD/YYYY, and most things in Drupal seem to be slanted toward DD/MM/YYYY. It seems like it should be a small deal, but one gets used to reading dates one way and it's hard to switch... this is only really bugging me right now as I'm going through the feature/bug lists.

The feature for selecting default date formatting in the site configuration is nice, but it should probably be set per-user.

A better way to do it might be to set it automatically based on the locale sent in the HTTP GET ACCEPT-LANGUAGE header. PHP should be able to access that and see that, for someone requesting en-US, they probably want to see dates differently than someone requesting en-GB.

If setting it automatically is not desirable, could the default for a new user account be set this way, and then let the user pick whatever he/she wants after that?

#1

Stefan Nagtegaal - May 26, 2003 - 19:16

Isn't this fixed a long time ago??? (by Alistair?)

#2

Bèr Kessels - May 19, 2005 - 20:42
Component:Base system» locale.module

filing this under locale.

#3

Gábor Hojtsy - May 20, 2007 - 13:56
Version:x.y.z» 6.x-dev

Drupal 6.x includes site-wide custom date formats. There is no support for locale based date formats however. When I proposed this I got shut down by reasons that date formats should not be tied to languages. English sites around the world all need different date formats. So enforcing date formats from PO files is probably not the way to go. More flexible settings could be. Translating site settings is on the horizon (might happen still in 6.x). That could allow different language versions of the date format. It still needs support and reviews: http://drupal.org/node/141461

 
 

Drupal is a registered trademark of Dries Buytaert.