php date day number code example
Example 1: php check weekday of date
$dayofweek = date('w', strtotime($date));
$result = date('Y-m-d', strtotime(($day - $dayofweek).' day', strtotime($date)));
Example 2: php date
$dateTime = new \DateTime();
/**
* You can get the string by using format
*/
$dateTime->format('Y-m-d H:i:s');
Example 3: show date php by letters
check here link: http://www.eltcalendar.com/stuff/datemysqlphp.html