okay here's what i'm trying to do.. i have a calendar program that i wrote but i'm having trouble figuring something that would seem to be easy to figure out...
What I'm trying to do is print out the events for each seprate day.. however the catch is that my day is not going to start at midnight it's going to start at 4 A.M... so i have 2 while loops.. the outer loop is move throughout each day.. while the inter loop is to print out each event according to the event's start date day.. the information i have is when the event starts (month,day,year,hour,minute) and when the event ends (month,day,year,hour,minute).. so i'm trying to think of a condision that lets me print out all the events between (for example) 6-10-2001 2:00 P.M. and 6-11-2001 1:00 A.M. and keep this event all on one day because it falls between 6-10-2001 4:00 A.M. and 6-11-2001 3:59:59 A.M.
when the inter loop starts the values are as follows:
$dateAry["day"] = current day
$dateAry["month"] = current month
$dateAry["year"] = current year
$results["rowData"]["STARTDATE"] = current day
$numRows = the number of events for the month
//outer loop
$index = 0;
while (blah) {
//inter loop..
while (($index < $numRows) && (mktime(4,0,0,(int)$dateAry["month"],(int)$dateAry["day"],(int)$dateAry["year"]) >= mktime(4,0,0,(int)$dateAry["month"],(int)substr($results["rowData"]["STARTDATE"][$index], 8, 9),(int)$dateAry["year"]))){
//print out events here...
$index++;
}
//go to next day to print out the events for it
$dateAry["day"]++;
}
Thanks for any help!
Jay