Beispiel #1
0
 /**
  * Test start and end date
  *
  * @param DateTime $start
  * @param \DateInterval $interval
  * @param DateTime $end
  * @param int $options
  *
  * @dataProvider periodProvider
  */
 public function testStartEndDate(DateTime $start, \DateInterval $interval, DateTime $end, int $options = null)
 {
     $period = new DatePeriod($start, $interval, $end, $options);
     $this->assertEquals($period->getStartDate()->format(), $start->format());
     $this->assertEquals($period->getEndDate()->format(), $end->format());
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 public function getEndDate() : DateTime
 {
     return new DateTime($this->period->getEndDate());
 }