NSDate *currentDate = [NSDate date];//获取当前时间,日期
NSDateFormatter dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"YYYY年MM月"];
NSString dateString = [dateFormatter stringFromDate:currentDate];
NSCalendarcalendar = [NSCalendar currentCalendar];
NSDateComponentscomps;
comps = [calendar components:NSCalendarUnitWeekdayOrdinal|NSCalendarUnitMonth|NSCalendarUnitWeekday fromDate:currentDate];
NSInteger weekdayOrdinal = [currentDate xx_weekOfMonth]; // 这个月的第几周