mem:
Good point!try something like this:
boolean isDaytimeNow()
{
// in this example, day starts at 6:30AM and ends at 6:30 PM
int startDayHour = 6; // 6 am
int startDayMinute = 30;
int endDayHour = 18; // 6PM
int endDayMinute = 30;
int thisHour = hour();
int thisMinute = minute();
boolean result = false;
// the following determines if the current hour and minute times are within
// the day start and end times
if( thisHour >= startDayHour) {
if( thisHour == startDayHour){
result = thisMinute > startDayMinute;
}
else{
if( (thisHour < endDayHour) || (thisHour == endDayHour && thisMinute < endDayMinute) ){
result = true;
}
}
}
return result;
}
like my previous post, this is untested but hopefully will get you going in the right direction
Neat! Will test it out when I get home.