mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-01 09:49:27 +00:00
Support for repetitive alarms and tasks
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSCalendarDate.h>
|
||||
#import <Foundation/NSDate.h>
|
||||
#import <Foundation/NSException.h>
|
||||
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
@@ -81,4 +83,35 @@
|
||||
return ex;
|
||||
}
|
||||
|
||||
- (iCalRepeatableEntityObject *) newOccurenceWithID: (NSString *) theRecurrenceID
|
||||
{
|
||||
iCalToDo *newOccurence, *master;
|
||||
NSCalendarDate *date, *firstDate;
|
||||
NSTimeInterval interval;
|
||||
|
||||
newOccurence = (iCalToDo *) [super newOccurenceWithID: theRecurrenceID];
|
||||
date = [newOccurence recurrenceId];
|
||||
|
||||
master = [self component: NO secure: NO];
|
||||
firstDate = [master startDate];
|
||||
|
||||
interval = [[master due]
|
||||
timeIntervalSinceDate: (NSDate *)firstDate];
|
||||
|
||||
[newOccurence setStartDate: date];
|
||||
[newOccurence setDue: [date addYear: 0
|
||||
month: 0
|
||||
day: 0
|
||||
hour: 0
|
||||
minute: 0
|
||||
second: interval]];
|
||||
|
||||
return newOccurence;
|
||||
}
|
||||
|
||||
- (void) prepareDeleteOccurence: (iCalToDo *) occurence
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@end /* SOGoTaskObject */
|
||||
|
||||
Reference in New Issue
Block a user