This commit is contained in:
Kazuhiro Ito 2021-03-13 15:53:49 +09:00
parent ce134aad28
commit a43f493637
1 changed files with 1 additions and 4 deletions

View File

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