X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/1c55a7cab4f66d3f8d5ba7717e01c5e8256a269a..988dcb3947c5e0d347f1002dbee2ff5c5c56e1db:/WEB-INF/lib/Period.class.php diff --git a/WEB-INF/lib/Period.class.php b/WEB-INF/lib/Period.class.php index 6c1eafe5..5730a75d 100644 --- a/WEB-INF/lib/Period.class.php +++ b/WEB-INF/lib/Period.class.php @@ -114,43 +114,13 @@ class Period { } } - /** - * Return all days by period - * - * @return array - */ - function getAllDays() { - $ret_array = array(); - if ($this->startDate->before($this->endDate)) { - $d = $this->getBegin(); - while ($d->before($this->getEnd())) { - array_push($ret_array, $d); - $d = $d->nextDate(); - } - array_push($ret_array, $d); - } else { - array_push($ret_array, $this->startDate); - } - return $ret_array; - } - function setPeriod($b_date, $e_date) { $this->startDate = $b_date; $this->endDate = $e_date; } - // return date object - function getBegin() { - return $this->startDate; - } - - // return date object - function getEnd() { - return $this->endDate; - } - // return date string - function getBeginDate($format="") { + function getStartDate($format="") { return $this->startDate->toString($format); } @@ -158,14 +128,4 @@ class Period { function getEndDate($format="") { return $this->endDate->toString($format); } - - function getArray($format="") { - $result = array(); - $d = $this->getBegin(); - while ($d->before($this->getEnd())) { - $result[] = $d->toString($format); - $d = $d->nextDate(); - } - return $result; - } }