[imp] Date display
Otto Stolz
Otto.Stolz at uni-konstanz.de
Wed Oct 24 08:19:56 UTC 2007
Sn!per schrieb:
> How do I change that to 3/10/2007 ?
I'd rather set the international format according to ISO 8801,
cf. <http://www.w3.org/QA/Tips/iso-date>, <http://en.wikipedia.org/wiki/ISO_8601>,
<http://www.cl.cam.ac.uk/~mgk25/iso-time.html>, and
<http://www.iso.org/iso/support/faqs/faqs_widely_used_standards/widely_used_standards_other/date_and_time_format.htm>.
You set this in horde/config/prefs.php:
$_prefs['date_format'] = array(
'value' => '%Y-%m-%d',
'locked' => false,
'shared' => true,
'type' => 'enum',
'enum' => array(
// '%x' => strftime('%x'),
'%Y-%m-%d' => strftime('%Y-%m-%d'),
'%d/%m/%Y' => strftime('%d/%m/%Y'),
'%A %B %d, %Y' => strftime('%A %B %d, %Y'),
'%A, %d. %B %Y' => strftime('%A, %d. %B %Y'),
'%A, %d %B %Y' => strftime('%A, %d %B %Y'),
'%a, %b %e, %Y' => strftime('%a, %b %e, %Y'),
'%a, %b %e, %y' => strftime('%a, %b %e, %y'),
'%a, %b %e' => strftime('%a, %b %e'),
'%a, %e %b %Y' => strftime('%a, %e %b %Y'),
'%a, %e %b %y' => strftime('%a, %e %b %y'),
'%a %d %b %Y' => strftime ('%a %d %b %Y'),
'%a %x' => strftime ('%a %x'),
'%a %Y-%m-%d' => strftime ('%a %Y-%m-%d'),
'%e %b %Y' => strftime('%e %b %Y'),
'%e. %b %Y' => strftime('%e. %b %Y'),
'%e. %m %Y' => strftime('%e %m %Y'),
'%e. %m.' => strftime('%e. %m.'),
'%e. %B' => strftime('%e. %B'),
'%e. %B %Y' => strftime('%e. %B %Y'),
'%e. %B %y' => strftime('%e. %B %y'),
'%B %e, %Y' => strftime('%B %e, %Y'),
),
'desc' => _("Choose how to display dates:"));
I have removed '%x' from the formats the user can select from,
as the outcome is unpredictable (it depends on the user's locale
setting), and the possibilities to choose from cover all possible
'%x' meanings, anyway (or so I think).
Best wishes,
Otto Stolz
More information about the imp
mailing list