From: defacer Date: Thu, 29 Apr 2004 07:50:12 +0000 (+0000) Subject: Small change to better respect the lang file date settings. Should be objectively X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0ef7c97344895ec998dc4dd51f2e10547a230aa3;p=moodle.git Small change to better respect the lang file date settings. Should be objectively "better" now. See http://moodle.org/mod/forum/discuss.php?d=7450 for the issue. --- diff --git a/calendar/lib.php b/calendar/lib.php index 9d1b0d9695..407ca16247 100644 --- a/calendar/lib.php +++ b/calendar/lib.php @@ -638,13 +638,18 @@ function calendar_filter_controls($type) { function calendar_day_representation($tstamp, $now = false, $usecommonwords = true) { + static $shortformat; + if(empty($shortformat)) { + $shortformat = strtolower(get_string('strftimedateshort')); + } + $days = array('sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'); if($now === false) { $now = time(); } // To have it in one place, if a change is needed - $formal = get_string($days[userdate($tstamp, '%w')], 'calendar') . userdate($tstamp,' %d %b'); + $formal = get_string($days[userdate($tstamp, '%w')], 'calendar') . userdate($tstamp, $shortformat); // Reverse TZ compensation: make GMT stamps correspond to user's TZ $tzfix = calendar_get_tz_offset();