Пример #1
0
 /**
  * @param  DateTime $start
  * @return DateTimeSpan
  */
 public function toDateTimeSpan(DateTime $start)
 {
     return new DateTimeSpan($this->from->toDateTime($start), $this->to->toDateTime($start));
 }
Пример #2
0
 /**
  * @covers ::toDateTime
  * @dataProvider dataToDateTime
  */
 public function testToDateTime($input, $start, $result)
 {
     $days = new Days($input);
     $this->assertEquals($result->format('d m Y'), $days->toDateTime($start)->format('d m Y'));
 }