You are here

private function Calendar::isPastMonth in Calendar 8

2 calls to Calendar::isPastMonth()
Calendar::calendarBuildMiniWeek in src/Plugin/views/style/Calendar.php
Build one mini week row.
Calendar::calendarBuildMonth in src/Plugin/views/style/Calendar.php
Build one month.

File

src/Plugin/views/style/Calendar.php, line 1121

Class

Calendar
Views style plugin for the Calendar module.

Namespace

Drupal\calendar\Plugin\views\style

Code

private function isPastMonth(int $month, int $current_month) {
  if ($current_month == 1 && $month == 12) {
    return TRUE;
  }
  elseif ($current_month == 12 && $month == 1) {
    return FALSE;
  }
  else {
    return $month < $current_month;
  }
}