I'm doing a scheduling function for my project im having problem getting all the days of a given week of a given month if the last week number of the previous month is also the first week number for the next month like 5th week for Oct 2015 is 44 but Nov 2015 1st week number is also 44
Loop through the days of the week, and test whether they're in the month you care about.
$month = 11;
$weekstart = strtoTime("2015W44");
$days = array();
for ($d = 0; $d < 7; $d++) {
$day = strtotime("+$d day", $weekstart);
if (date('n', $day) == $month) {
$days[] = $day;
}
}
When this is done, $days
will contain timestamps for all the days in week 44 that are in November.