Merge branch 'master' of https://github.com/giuseppenucifora/NSDate_Utils into dev
* 'master' of https://github.com/giuseppenucifora/NSDate_Utils: - Fix ParseDateFormat
This commit is contained in:
commit
e86571f3c8
8 files changed
+16
-18
No files matched your search
@@ -534,12 +534,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