- Fix ParseDateFormat
This commit is contained in:
1 parent
b0743ab730
commit
b296f50e28
8 files changed
+16
-18
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user