within() public method

public within ( DateTime $date )
$date DateTime
Beispiel #1
0
 public function testBackwardsCompatibleArrays()
 {
     $holiday = new \DateTime('2015-05-11');
     $business = new Business([new Day(Days::MONDAY, [['09:00', '13:00'], ['14:00', '17:00']]), new SpecialDay(Days::FRIDAY, function (\DateTime $date) {
         return [['10:00', '13:00'], ['14:00', '17:00']];
     })], [$holiday]);
     $this->assertFalse($business->within($holiday));
 }