Add handling of BYSETPOS for BYDAY in repeat rule

pull/278/head
Francis Lachapelle 2016-11-29 17:47:14 -05:00
parent b327be656b
commit 9529881948
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];
}