instance as follows:

 / * * * for a few weeks of the start date and end date * @param int $year * @param int $week * public function in a few weeks; weekday ($year, $week=1) {$year_start = mktime (0,0,0,1,1, $year; $year_end = mktime (0,0,0,12,31), $year); / / judge whether the first day for the first week to if (intval (date ('W', $year_start) ===1)) {$start = $year_start; / / the first day for the first week of the beginning of}else{$week++; $start = strtotime ('+1 Monday', $year_start); / / the first Monday as the start} the first few weeks of the start time / / if ($week===1) {$weekday['start'] = $start;}else{= $weekday['start'] strtotime ('+'. ($week-0) "Monday', $start);} / / the first few weeks of the end time of $weekday['end'] = strtotime ('+1 Sunday' $weekday['start']); if (date ('Y', $weekday['end'])! =$year) {$weekday['end'] = $year_end;} return $weekday;} / * * * one year the number of weeks, a week from Monday, if the last day after Thursday (Thursday) complete a week, otherwise not included in the last week of the year * if the first day before Thursday (Thursday) complete a week, otherwise not included in the first week of the year @param int * $year * return * int public function week ($year) {$year_start = mktime (0,0,0,1,1, $year); $year_end = mktime (0,0,0,12,31, $year); if (intval (date ('W', $year_end) ===1) return ('W', date) {strtotime ('last Week', $year_en D;}else{return)) date ('W', $year_end);}} over 

this PHP for a few weeks of the start date and end date of the share is small to give examples of all the people, I hope to give you a reference, I hope you will support the foot home.


This concludes the body part