]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/Period.class.php
Some cleanup in the Period class.
[timetracker.git] / WEB-INF / lib / Period.class.php
index 6c1eafe577476a54883b1ff0f25aa4bc2d1b7177..5730a75d04d47722c132dd4fa7d8eb45d82c5cf4 100644 (file)
@@ -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;
-       }
 }