mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-60635 calendar: Fix end of month issue with previous/next month
This reverts to the previous way in which this was calculated.
This commit is contained in:
parent
40f1801c4b
commit
a37faf9c70
1 changed files with 8 additions and 6 deletions
|
@ -64,15 +64,17 @@ class core_calendar_renderer extends plugin_renderer_base {
|
|||
$time = $calendartype->timestamp_to_date_array($calendar->time);
|
||||
|
||||
$current = $calendar->time;
|
||||
$prevmonthyear = $calendartype->get_prev_month($time['year'], $time['mon']);
|
||||
$prev = $calendartype->convert_to_timestamp(
|
||||
$time['year'],
|
||||
$time['mon'] - 1,
|
||||
$time['mday']
|
||||
$prevmonthyear[1],
|
||||
$prevmonthyear[0],
|
||||
1
|
||||
);
|
||||
$nextmonthyear = $calendartype->get_next_month($time['year'], $time['mon']);
|
||||
$next = $calendartype->convert_to_timestamp(
|
||||
$time['year'],
|
||||
$time['mon'] + 1,
|
||||
$time['mday']
|
||||
$nextmonthyear[1],
|
||||
$nextmonthyear[0],
|
||||
1
|
||||
);
|
||||
|
||||
$content = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue