Is there a way I can get an array of (string of days of the week) so: monday, tuesday, wednesday.... and also for months?
I can manually create that array, but I was wondering if there a more开发者_高级运维 eloquent way of doing this... Thanks.
This code;
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
NSArray *weekdays = [dateFormatter weekdaySymbols];
will give you the the weekdays in the users current locale.
If you want a particular locale set the desired locale on the dateFormatter.
Creating an NSDateFormatter is expensive so create one and reuse it.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论