Ejemplo n.º 1
0
 /**
  * Constructs a FiscalYear for the previous year from this instances start.
  * @return FiscalYear A new instance of FiscalYear
  */
 public function createPreviousFiscalYear()
 {
     // create new dates
     $dateEnd = clone $this->dateEnd;
     $dateEnd->modify('-1 year');
     $dateStart = clone $this->dateStart;
     $dateStart->modify('-1 year');
     // create fiscal year and set start & end
     $fiscalYear = new FiscalYear();
     $fiscalYear->setDateEnd($dateEnd);
     $fiscalYear->setDateStart($dateStart);
     // return new FiscalYear
     return $fiscalYear;
 }