Вы можете использовать смещение дня недели.В PHP на произвольную дату:
<?php
define('SEC_IN_DAY', (24*60*60));
$d = strtotime('2013-04-15');
// "w" is the day of the week. 0 for Sunday through 6 for Saturday
$delta_sun = -date('w', $d);
$delta_sat = $delta_sun + 6;
echo 'The day ' . date('Y-m-d H:i:s', $d) . "\n";
echo 'Last Sunday '. date('Y-m-d H:i:s', $d + $delta_sun * SEC_IN_DAY) . "\n";
echo 'Next Saturday '. date('Y-m-d H:i:s', $d + $delta_sat * SEC_IN_DAY) . "\n";
То же самое в MySQL:
SET @d := '2013-04-15';
SET @delta_sun := -DATE_FORMAT(@d, '%w');
SET @delta_sat := @delta_sun + 6;
SELECT 'The day' AS `name`, DATE(@d) AS `date`
UNION ALL
SELECT 'Last Sunday' AS `name`, DATE_ADD(@d, INTERVAL @delta_sun DAY) AS `date`
UNION ALL
SELECT 'Next Saturday' AS `name`, DATE_ADD(@d, INTERVAL @delta_sat DAY) AS `date`