fix #1114, properly handle repeating by weekdays, if repetition is daily

This commit is contained in:
tibbi 2020-04-17 17:18:06 +02:00
parent 5ee1890c2a
commit dbf692450f

View file

@ -40,6 +40,12 @@ class Parser {
if (interval.areDigitsOnly() && interval.toInt() % 7 == 0) { if (interval.areDigitsOnly() && interval.toInt() % 7 == 0) {
val dateTime = Formatter.getDateTimeFromTS(startTS) val dateTime = Formatter.getDateTimeFromTS(startTS)
repeatRule = Math.pow(2.0, (dateTime.dayOfWeek - 1).toDouble()).toInt() repeatRule = Math.pow(2.0, (dateTime.dayOfWeek - 1).toDouble()).toInt()
} else if (fullString.contains("BYDAY")) {
// some services use weekly repetition for repeating on specific week days, some use daily
// make these produce the same result
// RRULE:FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR
// RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
repeatInterval = WEEK_SECONDS
} }
} }
} else if (key == COUNT) { } else if (key == COUNT) {