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.
This commit is contained in:
defacer
2004-04-29 07:50:12 +00:00
parent b9f2b9bd99
commit 0ef7c97344
+6 -1
View File
@@ -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();