Closed (fixed)
Project:
Date
Version:
5.x-2.x-dev
Component:
Date API
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 May 2008 at 08:06 UTC
Updated:
22 May 2008 at 16:11 UTC
in date_api.module (line 175) we have:
function date_week_days_abbr($required = FALSE, $refresh = TRUE, $length = 3) {
if ($refresh || empty($weekdays)) {
$weekdays = array();
foreach (date_week_days_untranslated($refresh) as $key => $day) {
$weekdays[$key] = t(substr($day, 0, $length));
}
}
$none = array('' => '');
return !$required ? $none + $weekdays : $weekdays;
}
With this method, I have to work twice to translate both, complete days and first letter of the days. It is not a big deal, but the fact that some days start with the same letter makes it imposible to translate the first letter of the day correct.
I suggest changing the method to use the translated days and get the first letter already translated:
function date_week_days_abbr($required = FALSE, $refresh = TRUE, $length = 3) {
if ($refresh || empty($weekdays)) {
$weekdays = array();
foreach (date_week_days($refresh) as $key => $day) {
$weekdays[$key] = substr($day, 0, $length);
}
}
$none = array('' => '');
return !$required ? $none + $weekdays : $weekdays;
}
Comments
Comment #1
karens commentedMakes sense to me. Fix committed.
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.