質問

の方に知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];

参照 カレンダー、日付コンポーネント、カレンダー台)

から開始から最初の日で繰り返す毎日で終了日を平日にできるかどうかを判断する日時の週末はいません。(繰り返ることのない最適なトラック)

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top