Return true if date falls on particular week.
Posted: Mon Sep 04, 2006 7:53 pm
August
|------------------------|--------------------------|---------------------------|
M T W T F S S M T W T F S S M T W T F S S M
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Date Time Item
07/08/06 13.00 1
08/08/06 14.00 2
14/08/06 15.00 3
15/08/06 14.00 4
16/08/06 13.00 5
17/08/06 14.00 6
18/08/06 13.00 7
19/08/06 14.00 8
21/08/06 13.00 9
How can I code in such a way that if the date is 21 Aug at 12.45, I would like to get all the item that falls on that week from 14 Aug 13.01 to 21 Aug 13.00 ??
if the date is 22 Aug at 15.00, i would like to get all the item that falls on the week from 21 aug 13.01 to 28 Aug 13.00.
function getweek($dbdate, $dbtime, $todaydate, $todaytime){
// return true if database date falls on the range
}
|------------------------|--------------------------|---------------------------|
M T W T F S S M T W T F S S M T W T F S S M
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Date Time Item
07/08/06 13.00 1
08/08/06 14.00 2
14/08/06 15.00 3
15/08/06 14.00 4
16/08/06 13.00 5
17/08/06 14.00 6
18/08/06 13.00 7
19/08/06 14.00 8
21/08/06 13.00 9
How can I code in such a way that if the date is 21 Aug at 12.45, I would like to get all the item that falls on that week from 14 Aug 13.01 to 21 Aug 13.00 ??
if the date is 22 Aug at 15.00, i would like to get all the item that falls on the week from 21 aug 13.01 to 28 Aug 13.00.
function getweek($dbdate, $dbtime, $todaydate, $todaytime){
// return true if database date falls on the range
}