iphone - Why can't I correctly parse this date string with NSDateFormatter? -


I am trying to parse a string that is generated by using an NSDateFormatter with the same format using the other NSDateFormatter I went.

Instead of trying to make that last sentence, there is some code:

  NSDateFormatter * format = [[NSDateFormatter alloc] init]; [Format setDateFormat: @ "MMM DD, YYYH H: MM"]; NSDT * now = [[NSDT allok] Init]; NSString * dateString = [format string format: now]; NSDateFormatter * inFormat = [[NSDateFormatter alloc] init]; [Informatetet format: @ "MMM DD, YYYH H: MM"]; NSDT * Parsed = [Format date formatting: datestring]; NSLog (@ "\ n" "Now: |% @ | \ n" "Date String: |% @ | \ n" "Parsed: |% @ |", Now, Dest String, Parsed);  

When I run this code, I hope that is parsed will have the same date as now but instead of me The following output is available:

Now: | 2009-05-04 18:23:35 -0400. Date String: May 04, 2009 18:23. Parsed: | 2008-12-21 18:23:00 -0500.

YYYY "Formatting a valid ICU date There is no option you want "yyyy".

Capital 'Y' is valid only when used with the "Week of the year" option (i.e. "Weiq" '' V '')


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -