NSDateFormatter dateFromString gives the wrong date

前端 未结 2 2003
花落未央
花落未央 2020-12-09 17:25

I\'ve already tried the suggestions in other posts similar to this with no avail. Here is the situation:

I have an NSString like this:

Fri November          


        
2条回答
  •  半阙折子戏
    2020-12-09 17:53

    I think you need "EEE MMMM d, YYYY" i.e. triple E as format string. If this does not work, I recommend using hard coded strings with easier dates and formats to break down the problem. See for example NSDateFormatter not working for more hints on that topic.

提交回复
热议问题