/** * @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(); }
public function testTimeSpanAsDurationWithStartDate() { $this->assertTimeSpan(TimeSpan::asDurationWithStartDate(new DateTime("2012-01-01"), 0, 6)); }