NSDateComponents *compt = [[NSDateComponents alloc] init];
[compt setYear:2015];
[compt setMonth:12];
[compt setDay:15];
NSCalendar *calendar = [NSCalendar currentCalendar];
NSDate *date = [calendar dateFromComponents:compt];
NSUInteger count = [calendar ordinalityOfUnit:NSCalendarUnitWeekOfYear inUnit:NSCalendarUnitYear forDate:date];
The value of count is 51, which is the 51st week of 2015;
For detailed explanation, please see the blog: http://blog.csdn.net/felicity294250051/article/details/48496859