Ohh, what is wrong with this code !?!?!
NSString *s1 = @"5 Oct 2010 18:30";
NSString *s2 = @"5 Oct 2010 09:47";
NSRange range = {0, 11}; // Both "D MMM YYYY " and "DD MMM YYYY"
NSComparisonResult result = 0;
result = [s1 compare:s2 options:NSLiteralSearch range:range];
// result == -1
NSString *sa = [s1 substringWithRange:range];
NSString *sb = [s2 substringWithRange:range];
result = [sa compare:sb];
// result == 0
Why do I get different results from those two comperes? As far as I can tell, they should be same?