3

I Have two notification and I want to repeat it alternative week.

E.g. One notification set on 1st week's monday and it should repeat on 3rd week's monday. Second notification set on 2nd week's tuesday and it should repeat on 4th week's tuesday.

What should I do for this?

4

2 回答 2

0

获取周数并根据周数做出决定

于 2012-11-02T12:02:39.843 回答
0
-(NSString*) getWeekOfMonth {
  NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
 [dateFormatter setDateStyle:NSDateFormatterMediumStyle];
 [dateFormatter setTimeStyle:NSDateFormatterShortStyle];
 [dateFormatter setDateFormat:@"W"];

 NSString *weekNumber = [dateFormatter stringFromDate:[NSDate date]];    
 [dateFormatter release];    
 return weekNumber;
}

NSInteger weekInt = [weekNumber integerValue];
于 2012-11-02T12:08:26.940 回答