Beispiel #1
0
 public function isBetween(DateTime $start, DateTime $end)
 {
     $thisDateTime = $this->toDateTime();
     return $thisDateTime < $end->toDateTime() ? $thisDateTime > $start->toDateTime() : false;
 }
Beispiel #2
0
 public static function fromDateTime(DateTimePhp $dateTime)
 {
     return new Date($dateTime->format('Y'), $dateTime->format('m'), $dateTime->format('d'));
 }