getStartDate() public method

Returns the starting date point.
public getStartDate ( ) : DateTimeImmutable
return DateTimeImmutable
示例#1
0
 public function __construct(Season\Name $name, Period $period)
 {
     if ($period === null) {
         throw new \InvalidArgumentException("de periode moet gezet zijn", E_ERROR);
     }
     parent::__construct($period->getStartDate(), $period->getEndDate());
     if ($name === null) {
         throw new \InvalidArgumentException("de naam moet gezet zijn", E_ERROR);
     }
     $this->m_name = $name;
 }
示例#2
0
 /**
  * Computes the gap between two Period objects.
  *
  * @param Period $period
  *
  * @return static
  */
 public function gap(Period $period)
 {
     if ($period->getStartDate() > $this->startDate) {
         return new static($this->endDate, $period->getStartDate());
     }
     return new static($period->getEndDate(), $this->startDate);
 }