Fork me on Github

Class CalendR\Event\ AbstractEvent

Abstract class that ease event manipulation


Implements: EventInterface

Methods

bool contains( DateTime $datetime)

Check if the given date is during the event

bool containsPeriod( PeriodInterface $period)

Check if the given period is during the event

bool isDuring( PeriodInterface $period)

Check if the event is during the given period

Details

public bool contains( DateTime $datetime)

Check if the given date is during the event

Parameters
DateTime $datetime
Return Value
bool true if $datetime is during the event, false otherwise

public bool containsPeriod( PeriodInterface $period)

Check if the given period is during the event

Parameters
PeriodInterface $period
Return Value
bool true if $period is during the event, false otherwise

public bool isDuring( PeriodInterface $period)

Check if the event is during the given period

Parameters
PeriodInterface $period
Return Value
bool true if the event is during $period, false otherwise