mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36: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);
|
$time = $calendartype->timestamp_to_date_array($calendar->time);
|
||||||
|
|
||||||
$current = $calendar->time;
|
$current = $calendar->time;
|
||||||
|
$prevmonthyear = $calendartype->get_prev_month($time['year'], $time['mon']);
|
||||||
$prev = $calendartype->convert_to_timestamp(
|
$prev = $calendartype->convert_to_timestamp(
|
||||||
$time['year'],
|
$prevmonthyear[1],
|
||||||
$time['mon'] - 1,
|
$prevmonthyear[0],
|
||||||
$time['mday']
|
1
|
||||||
);
|
);
|
||||||
|
$nextmonthyear = $calendartype->get_next_month($time['year'], $time['mon']);
|
||||||
$next = $calendartype->convert_to_timestamp(
|
$next = $calendartype->convert_to_timestamp(
|
||||||
$time['year'],
|
$nextmonthyear[1],
|
||||||
$time['mon'] + 1,
|
$nextmonthyear[0],
|
||||||
$time['mday']
|
1
|
||||||
);
|
);
|
||||||
|
|
||||||
$content = '';
|
$content = '';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue