Add handling of BYSETPOS for BYDAY in repeat rule

This commit is contained in:
Francis Lachapelle
2016-11-29 17:47:14 -05:00
parent a0e7e9d24e
commit d4a4e49521
2 changed files with 14 additions and 1 deletions

6
NEWS
View File

@@ -1,3 +1,9 @@
2.3.19 (2016-12-DD)
-------------------
Enhancements
- [core] added handling of BYSETPOS for BYDAY in recurrence rules
2.3.18 (2016-11-28)
-------------------

View File

@@ -472,9 +472,16 @@ NSString *iCalWeekDayString[] = { @"SU", @"MO", @"TU", @"WE", @"TH", @"FR",
- (iCalByDayMask *) byDayMask
{
NSArray *setPos;
NSString *day;
if (dayMask == nil && [[self byDay] length])
{
dayMask = [iCalByDayMask byDayMaskWithRuleString: [self byDay]];
day = [self byDay];
setPos = [self bySetPos];
if ([setPos count])
day = [NSString stringWithFormat: @"%@%@", [setPos lastObject], day];
dayMask = [iCalByDayMask byDayMaskWithRuleString: day];
[dayMask retain];
}