You are here

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

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

Return value

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

Overrides RoomsEventInterface::sameYear

2 calls to RoomsEvent::sameYear()
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
RoomsEvent::transformToYearlyEvents in includes/rooms.event.inc
Takes an event that spans several years and transforms it to yearly events

File

includes/rooms.event.inc, line 88

Class

RoomsEvent

Code

public function sameYear() {
  if ($this
    ->startYear() == $this
    ->endYear()) {
    return TRUE;
  }
  return FALSE;
}