- var_dump: documentation ( source)
- setlocale: documentation ( source)
<?php
// http://stackoverflow.com/questions/13128854/php-datetime-class-change-first-day-of-the-week-to-monday?rq=1
$test = new DateTime('2012-11-04');
// 2012-11-05 // I expect to get 2012-10-29
var_dump($test->modify('Monday this week')->format('Y-m-d'));
setlocale(LC_ALL, 'nl_NL');
$test = new DateTime('2012-11-04');
// 2012-11-05 // I expect to get 2012-10-29
var_dump($test->modify('Monday this week')->format('Y-m-d'));