I want to compare two NSDates with NOW ([NSDate date]).
NSDate *date1 = [NSDate dateWithString:@"1982-02-12 07:00:00 +0100"];
NSDate *now = [NSDate dateWithString:@"2012-01-25 10:19:00 +0100"]; //example
NSDate *date2 = [NSDate dateWithString:@"1989-02-12 15:00:00 +0100"];
I would like to check if now is between date1 and date2. In the example above this is the case. The date component should be completely ignored, so only the time component should be compared. How could I accomplish this?
Thanks in advance!