Merge pull request #1307 from ikazuhiro/fix-exdate-parse

fix commit 263dec79df20ea491a154808de9c68e0a06a5755
This commit is contained in:
Tibor Kaputa 2021-03-13 08:17:26 +01:00 committed by GitHub
commit fcafa218cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -245,7 +245,7 @@ class CalDAVHelper(val context: Context) {
if (exdate.length > 8) {
val lines = exdate.split("\n")
for (line in lines) {
val dates = line.split(",")
val dates = line.split(",", ";")
dates.filter { it.isNotEmpty() && it[0].isDigit() }.forEach {
if (it.endsWith("Z")) {
// convert for example "20190216T230000Z" to "20190217000000" in Slovakia in a weird way
@ -258,9 +258,6 @@ class CalDAVHelper(val context: Context) {
var potentialTS = it.substring(0, 8)
if (potentialTS.areDigitsOnly()) {
event.repetitionExceptions.add(potentialTS)
} else if (it.contains(";")) {
potentialTS = it.substringAfter(";").substring(0, 8)
event.repetitionExceptions.add(potentialTS)
}
}
}