fix #1114, properly handle repeating by weekdays, if repetition is daily
This commit is contained in:
parent
5ee1890c2a
commit
dbf692450f
1 changed files with 6 additions and 0 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue