Closed WangGuibin closed 8 years ago
- (NSInteger)yearForWeekOfYear { return [[[NSCalendar currentCalendar] components:NSCalendarUnitYearForWeekOfYear fromDate:self] yearForWeekOfYear]; }
weekOfYear 我知道是一年有多少个星期,yearForWeekOfYear ,表示英文差,难以理解哦...
以 "NSCalendarUnitYearForWeekOfYear" 去搜索,应该能有不少结果。
噢噢
最近也看到这个东西 http://stackoverflow.com/questions/29025462/difference-between-year-and-yearforweekofyear-ios-nsdatecomponents 和里面的wiki看下就可以了
weekOfYear 我知道是一年有多少个星期,yearForWeekOfYear ,表示英文差,难以理解哦...