/**
  * Does another range end after this one does?
  *
  * @param DateRange $other_range
  * @return bool True if the other range ends after this one.
  */
 function endsAfter($other_range)
 {
     $this_end = $this->getEndDate();
     $other_end = $other_range->getEndDate();
     return $this_end->after($other_end);
 }
Exemple #2
0
 /**
  * @param DateRange $dateRange
  * @return string
  */
 public static function toString(DateRange $dateRange)
 {
     return sprintf('[%s,%s]', $dateRange->getStartDate()->format('Y-m-d'), $dateRange->getEndDate()->format('Y-m-d'));
 }