1 2 3 4 | NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSDateComponents *components = [calendar components:NSDayCalendarUnit fromDate:start toDate:current options:0]; NSInteger pastDay = [components day]; |
1 2 3 | NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSDateComponents = [calender components:(NSYearCalenderUnit | NSMonthCalenderUnit | NSDayCalenderUnit) fromDate:date]; date = [calender dateFromComponents:components]; |
0 件のコメント :
コメントを投稿