<?php $datetime = new DateTime( date('Y-m-d' ) ); if ( $datetime->format('w') > 0 ) $datetime->modify('last sunday'); echo $datetime->format('Y-m-d');
You have javascript disabled. You will not be able to edit any code.