mangstadt / biweekly

biweekly is an iCalendar library written in Java.
BSD 2-Clause "Simplified" License
323 stars 44 forks source link

EXDATE is parsed as a DATE-TIME while it is a DATE #125

Closed lucclaes closed 1 year ago

lucclaes commented 1 year ago

While parsing a VEVENT with: EXDATE:20230325 the result is an ICalDate with hasTime == true

while with: EXDATE;VALUE=DATE:20230325 the result is an ICalDate with hasTime == false, as expected.

Isn't VALUE=DATE optional and shouldn't the first EXDATE parse to a DATE ICalDate ?

mangstadt commented 1 year ago

If EXDATE does not have a VALUE parameter, then the default data type will be DATE-TIME. This is why the ICalDate object says it has a time component when the original date string does not.

In other words, EXDATE:20230325 is the same as EXDATE;VALUE=DATE-TIME:20230325

lucclaes commented 1 year ago

Thank you. I thought a YYYYMMDD format was implicitly interpreted as a VALUE=DATE but, by reading RFC 5545 I was wrong...