/** * Get a Date object for the day before this one * * Get a Date object for the day before this one. * The time of the returned Date object is the same as this time. * * @access public * @return object Date Date representing the previous day */ function getPrevDay() { $day = Calc::prevDay($this->day, $this->month, $this->year, "%Y-%m-%d"); $date = sprintf("%s %02d:%02d:%02d", $day, $this->hour, $this->minute, $this->second); $newDate = new Date(); $newDate->setDate($date); return $newDate; }