1// how to check the day of any date in php?
2
3//Our YYYY-MM-DD date string.
4$date = $request->start_date;
5
6//Convert the date string into a unix timestamp.
7$unixTimestamp = strtotime($date);
8
9//Get the day of the week using PHP's date function.
10$dayOfWeek = date("l", $unixTimestamp);
11
12//Print out the day that our date fell on.
13$day = $date . ' fell on a ' . $dayOfWeek;
1// function
2cal_days_in_month(calendar,month,year);
3//e.g.
4$d=cal_days_in_month(CAL_GREGORIAN,10,2005);
5echo "There was $d days in October 2005";