差2NSDatesを除く週末に何をすればいいですか。
質問
の方に知Excel、私の活動に活用しようとしているsimiliar NETWORKDAYS機能ココア。
誰でもできるので、プロダクトデザインが私を構築することも必要である、NSDate catagoryで可視化することができるのみ営業日betweekコミック?
多くん Nik
解決
知っているしたいと思います。は、適切な値になっていただけるようになります。で利用できますNSCalendarのNSDateComponentsう:
// Date of today
NSDate *today = [NSDate date];
// init the gregorian calendar
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
// Retrieve the NSDateComponents for the current date
NSDateComponents *weekdayComponents = [gregorian components:(NSDayCalendarUnit | NSWeekdayCalendarUnit) fromDate:today];
// Number of the day in the week (e.g 2 = Monday)
NSInteger weekday = [weekdayComponents weekday];
から開始から最初の日で繰り返す毎日で終了日を平日にできるかどうかを判断する日時の週末はいません。(繰り返ることのない最適なトラック)
所属していません StackOverflow