mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-04 12:58:50 +00:00
Improve debugging output of recurrence calculator
This commit is contained in:
@@ -61,6 +61,8 @@
|
||||
long i, count, repeatCount;
|
||||
unsigned interval;
|
||||
|
||||
//[self logWithFormat: @"Recurrence rule is %@", rrule];
|
||||
|
||||
firStart = [firstRange startDate];
|
||||
startDate = [_r startDate];
|
||||
endDate = [_r endDate];
|
||||
|
||||
@@ -921,4 +921,28 @@ NSString *iCalWeekDayString[] = { @"SU", @"MO", @"TU", @"WE", @"TH", @"FR",
|
||||
return isEqual;
|
||||
}
|
||||
|
||||
- (NSString *) description
|
||||
{
|
||||
NSMutableString *str;
|
||||
|
||||
str = [NSMutableString stringWithString: [self flattenedValuesForKey: @"freq"]];
|
||||
|
||||
if ([self repeatInterval] > 1)
|
||||
[str appendFormat: @" interval of %i", [self repeatInterval]];
|
||||
if ([self repeatCount])
|
||||
[str appendFormat: @" for %i times", [self repeatCount]];
|
||||
if ([self untilDate])
|
||||
[str appendFormat: @" until %@", [self untilDate]];
|
||||
if ([[self valuesAtIndex: 0 forKey: @"bymonthday"] count])
|
||||
[str appendFormat: @" BYMONTHDAY:%@", [self flattenedValuesForKey: @"bymonthday"]];
|
||||
if ([[self valuesAtIndex: 0 forKey: @"byday"] count])
|
||||
[str appendFormat: @" BYDAY:%@", [self flattenedValuesForKey: @"byday"]];
|
||||
if ([[self valuesAtIndex: 0 forKey: @"bymonth"] count])
|
||||
[str appendFormat: @" BYMONTH:%@", [self flattenedValuesForKey: @"bymonth"]];
|
||||
if ([[self valuesAtIndex: 0 forKey: @"bysetpos"] count])
|
||||
[str appendFormat: @" BYSETPOS:%@", [self flattenedValuesForKey: @"bysetpos"]];
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
@end /* iCalRecurrenceRule */
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
iCalByDayMask *dayMask;
|
||||
BOOL hasRepeatCount;
|
||||
|
||||
[self logWithFormat: @"Weekly %@", rrule];
|
||||
//[self logWithFormat: @"Recurrence rule is %@", rrule];
|
||||
|
||||
firStart = [firstRange startDate];
|
||||
startDate = [_r startDate];
|
||||
|
||||
Reference in New Issue
Block a user