NSDateFormatter problem with EEE working day

Why is the following code output: Dday: (null)

NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"EEE HH:mm:ss"];
NSDate *date = [dateFormatter dateFromString:@"Sun 15:00:00"];
DLog(@"Ddate: %@", date);

If I use the format HH: mm: ss and string 15:00:00, I get a valid date ...

Welcome buddy

+3
source share
2 answers

This may be due to the language of your system / device, look at apple from

http://developer.apple.com/mac/library/qa/qa2010/qa1480.html

+3
source

Are you sure this eee is not eee? I used eee and it works great.

+1
source

Source: https://habr.com/ru/post/1762287/


All Articles