NSDate *date = [NSDate date]; NSCalendar *gregCal = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSDateComponents *weekdayComponents = [gregCal components:(NSDayCalendarUnit|NSWeekdayCalendarUnit) fromDate:date]; NSInteger weekday = [weekdayComponents weekday];1が日曜日, 7が土曜日
0 件のコメント :
コメントを投稿