when i parse my xml i will get date like this Fri Nov 06 12:29:39 IST 2015
This is my xcode part
NSLog(@"%@",parsedElementContent);
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"EEE, d MMM yyyy HH:mm:ss Z"];
[_currentItem setPubDate:[formatter dateFromString:[self trimString:parsedElementContent]]];
Where this part returns null
[formatter dateFromString:[self trimString:parsedElementContent]]
- (NSString *)trimString:(NSString *)originalString{
NSString * trimmedString;
trimmedString = [originalString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
return trimmedString;
}
I this this part is wrong @"EEE, d MMM yyyy HH:mm:ss Z"