|
Posted by Steve on 03/02/07 16:19
| > ok...just saw the the end date should be the last second of sunday. add
| > this
| > as your final line of code:
| >
| > $sunday = strtotime(date('m/d/Y', $sunday) . ' 24:59:59');
NOTE!!!
'ADD this as your FINAL line of code:'
| Am I missing soothing here, the Monday is correct, but I can't see how you
| are working out the Sunday, if I run the script I get the following
all is well. perhaps i should not give directions, but instead give code.
here's the uncommented, fully-complete code:
$today = strtotime(date('m/d/Y') . ' 00:00');
$monday = strtotime('last monday', $today);
if (intval(strftime('%w', $today)) != 0) {
$monday = strtotime('last monday', $monday);
}
$sunday = strtotime('next sunday', $monday);
$sunday = strtotime(date('m/d/Y', $sunday) . ' 23:59:59');
[Back to original message]
|