Try this:
defined('jj') ? NULL : define('jj', '<br />');
$a=array
(
'd M y', // 13 Feb 12
'd M Y', // 13 Feb 2012
'dS F y', // 13th Feb 12
'dS F Y', // 13th Feb 2012
'dS F y T', // 13th Feb 2012Europe/Berlin
'dS F y Tb', // 13th Feb 2012Europe/Berlinb
);
$monday_this_week = strtotime ( date ( 'Y' ) . 'W' . date ( 'W' ) . '1');
foreach($a as $x):
echo jj, "Week Commencing Monday "
. 'date(' ."'"
. $x
. "', "
. '$monday_this_week);';
echo jj, "Week Commencing Monday "
. date($x, $monday_this_week);
echo jj;
endforeach;
echo jj,jj, '// Your code:';
$monday_this_week = date ('d M', strtotime ( date ( 'Y' ) . 'W' . date ( 'W' ) . '1' ) ); //The last number is the num of the weekday. 0 being sunday.
echo jj, "Week Commencing Monday ".date($monday_this_week);echo jj, "Week Commencing MONDAY ". date($monday_this_week);
echo jj;
echo jj, 'http://php.net/manual/en/function.date.php';
Output:
Week Commencing Monday date(‘d M y’, $monday_this_week);
Week Commencing Monday 13 Feb 12
Week Commencing Monday date(‘d M Y’, $monday_this_week);
Week Commencing Monday 13 Feb 2012
Week Commencing Monday date(‘dS F y’, $monday_this_week);
Week Commencing Monday 13th February 12
Week Commencing Monday date(‘dS F Y’, $monday_this_week);
Week Commencing Monday 13th February 2012
Week Commencing Monday date(‘dS F y T’, $monday_this_week);
Week Commencing Monday 13th February 12 CET
Week Commencing Monday date(‘dS F y Tb’, $monday_this_week);
Week Commencing Monday 13th February 12 CETb
// Your code:
Week Commencing Monday 13 FebruaryEurope/Berlinb
Week Commencing MONDAY 13 FebruaryEurope/Berlinb
http://php.net/manual/en/function.date.php