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:
+6
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user