You are here

public function RoomsEvent::sameMonth in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Checks if the event starts and ends in the same month.

Return value

bool TRUE if the event starts and ends in the same month, FALSE otherwise

Overrides RoomsEventInterface::sameMonth

1 call to RoomsEvent::sameMonth()
RoomsEvent::transformToMonthlyEvents in includes/rooms.event.inc
Takes a single event that spans several months and transforms it to monthly events - this assumes that the event is contained within a year

File

includes/rooms.event.inc, line 78

Class

RoomsEvent

Code

public function sameMonth() {
  if ($this
    ->startMonth() == $this
    ->endMonth() && $this
    ->startYear() == $this
    ->endYear()) {
    return TRUE;
  }
  return FALSE;
}