PHP kullanarak nasıl herhangi bir tarihten itibaren haftaki başlangıç ve bitiş tarihini alabilirsiniz. Örneğin 2010-05-13 Perşembe yani nasıl 2010-05-09 (Paz) almak ve 2010-05-15 edebilirsiniz (SAT)
Ile DateTime (PHP 5.2 +):
function weekBorders($date) {
$borders = array();
$borders['first'] = new DateTime($date->format('Y-m-d') .' - '. $date->format('w') .' days');
$borders['last'] = new DateTime($date->format('Y-m-d') .' + '. (6 - $date->format('w')) .' days');
return $borders;
}