Merge pull request #1133 from pcsaunak/master

Parsing of .ics file for key BYMONTHDAY
This commit is contained in:
Tibor Kaputa 2020-05-05 09:50:28 +02:00 committed by GitHub
commit 752f819e49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -60,8 +60,10 @@ class Parser {
} else if (repeatInterval.isXMonthlyRepetition() || repeatInterval.isXYearlyRepetition()) {
repeatRule = if (value.startsWith("-1")) REPEAT_ORDER_WEEKDAY_USE_LAST else REPEAT_ORDER_WEEKDAY
}
} else if (key == BYMONTHDAY && value.toInt() == -1) {
repeatRule = REPEAT_LAST_DAY
} else if (key == BYMONTHDAY) {
if (value.split(",").any { it.toInt() == -1 }) {
repeatRule = REPEAT_LAST_DAY
}
}
}
return EventRepetition(repeatInterval, repeatRule, repeatLimit)