- Fix ParseDateFormat

This commit is contained in:
giuseppenuc committed 2017-01-03 23:56:11 +01:00
1 parent b0743ab730
commit b296f50e28
8 files changed
+16 -18

No files matched your search

+4 -6
View File
@@ -523,12 +523,10 @@ static NSDateFormatter *_displayFormatter = nil;
[dateFormatter setDateFormat:dateFormat];
NSDate *theDate = nil;
NSError *error = nil;
if (![dateFormatter getObjectValue:&theDate forString:dateString range:nil error:&error]) {
NSLog(@"Date '%@' could not be parsed: %@", dateString, error);
}
else {
NSDate *theDate = [NSDate dateFromString:dateString withFormat:dateFormat];
if (theDate) {
return dateFormat;
}
}