is there any way to get the first day of the current week according to the current customer locales settings?
The current date is:
$today = date("Y-m-d", Mage::getModel('core/date')->timestamp(time()));
The current first day of the week by server's settings is:
$firstDayOfWeek = date("Y-m-d", strtotime('this week', Mage::getModel('core/date')->timestamp(time())));
I'm using magento 1.7.* CE version.
I'm don't know much about magento but if you just need the timestamp then strtotime
is quite nice for this.
$weekBeginning = date('Y-m-d', Mage::getModel('core/date')->timestamp(strtotime('last monday')));