示例#1
0
文件: Date.php 项目: ulrikkold/cal
 /**
  * Get a Date object for the weekday before this one
  *
  * Get a Date object for the weekday 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 weekday
  */
 function getPrevWeekday()
 {
     $day = Calc::prevWeekday($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;
 }