diff --git a/calendar/delete.php b/calendar/delete.php index 8a3d0977036..7ab989a471f 100644 --- a/calendar/delete.php +++ b/calendar/delete.php @@ -68,8 +68,8 @@ $event->count_repeats(); // Is used several times, and sometimes with modification if required $viewcalendarurl = new moodle_url(CALENDAR_URL.'view.php', array('view'=>'upcoming')); -$viewcalendarurl->param('cal_y', date('Y', $event->timestart)); -$viewcalendarurl->param('cal_m', date('m', $event->timestart)); +$viewcalendarurl->param('cal_y', userdate($event->timestart, '%Y')); +$viewcalendarurl->param('cal_m', userdate($event->timestart, '%m')); // If confirm is set (PARAM_BOOL) then we have confirmation of initention to delete if ($confirm) { @@ -124,4 +124,4 @@ $event->time = calendar_format_event_time($event, time(), null, false); calendar_print_event($event, false); echo $OUTPUT->box_end(); -echo $OUTPUT->footer(); \ No newline at end of file +echo $OUTPUT->footer(); diff --git a/calendar/event.php b/calendar/event.php index dd98be36dec..130e682351f 100644 --- a/calendar/event.php +++ b/calendar/event.php @@ -168,9 +168,9 @@ if ($data) { $params = array( 'view' => 'day', - 'cal_d' => date('j', $event->timestart), - 'cal_m' => date('n', $event->timestart), - 'cal_y' => date('y', $event->timestart), + 'cal_d' => userdate($event->timestart, '%d'), + 'cal_m' => userdate($event->timestart, '%m'), + 'cal_y' => userdate($event->timestart, '%Y'), ); $eventurl = new moodle_url('/calendar/view.php', $params); if (!empty($event->courseid) && $event->courseid != SITEID) {