What is the easiest way to have an if
statement between two times? For example:
if ([timeisBetween=1:00 and 8:40]) {
NSLog(@"Inside time period");
}
else {
NSLog(@"Not in time period - after 8:30 in the morning")
}
and
if ([timeisBetween=22:00 and 5:40]) {
NSLog(@"Inside time period 10:00 at night to 5:40 in the morning");
}
else {
NSLog(@"Not in time period");
}