取本周第一天的日期 每周第一天是星期几
* 设置每周第一天是星期几
* @param string $week 星期0-6
* @return void
*/
public function setFirstDayOfWeek($week = 1) {
$this->firstDayOfWeek = $week;
}
/**
* 取本周第一天的日期
* @return string
*/
public function getFirstDayOfWeek ($format='') {
$todayOfWeek = $this->getPart('w');
/* 此处还有问题 */
$firstDay = $this->add($this->firstDayOfWeek-$todayOfWeek,'dd',$format);
return $firstDay;
}