コード例 #1
0
ファイル: DebtAmortizator.php プロジェクト: uruba/financalc
 /**
  * @param DateTime $startDate [The start date of the debt]
  * @return DateTime [The end date of the debt]
  */
 public function getDebtEndDate(DateTime $startDate)
 {
     return TimeSpan::asDurationWithStartDate($startDate, 0, 0, (int) $this->getDebtLengthInDays())->getEndDate();
 }
コード例 #2
0
ファイル: TimeSpanTest.php プロジェクト: uruba/financalc
 public function testTimeSpanAsDurationWithStartDate()
 {
     $this->assertTimeSpan(TimeSpan::asDurationWithStartDate(new DateTime("2012-01-01"), 0, 6));
 }