im looking for the DateTime modify String for the first day of the year (now 1. January 2011). I tried the following:
$time = new DateTime();
// works as expected, the first day of the current month
$time->modify('first day of this month');
// this doesn't work. I also tried several other ways
$time->modify('first day of january');
You should specify the year too, as you can see in this example:
"first day of January 2008"
from the official doc.
Update: It works on php version >= 5.3.6