How can I get the Sunday and Saturday of the week given a specific date?
For example:
input: Monday, September 28, 2009 output should be:>
input: Monday, September 28, 2009
output should be:>
This is what your looking for. It is what I use.
$beginningOfWeek = date('Y-m-d H:i:s', strtotime('last Sunday')); $endOfWeek = date('Y-m-d H:i:s', strtotime('+6 day', strtotime('last Sunday')) );