Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having problems with an EXDate #18

Open
rutledgek opened this issue Nov 2, 2020 · 9 comments
Open

Having problems with an EXDate #18

rutledgek opened this issue Nov 2, 2020 · 9 comments

Comments

@rutledgek
Copy link

rutledgek commented Nov 2, 2020

I have the following calendar Content. When I run the icalExpander.between() I get an error of invalid date-time value: "2020-11-26T::"

The calendar content seems to be building the EXDate with a a comma-separated list of dates without times. Does the expander expect dates and times there? The Icalendar Format.org definition seems to allow for date-time or date.

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//ddaysoftware.com//NONSGML DDay.iCal 1.0//EN
BEGIN:VEVENT
DTEND:20201110T110000
DTSTAMP:20201102T160712Z
DTSTART:20201110T080000
EXDATE:20201126,20201127
RRULE:FREQ=WEEKLY;BYDAY=MO,TH
SEQUENCE:0
UID:652ea16f-d20f-472b-b906-191e5339cf55
END:VEVENT
END:VCALENDAR
@mifi
Copy link
Owner

mifi commented Nov 3, 2020

Where did you get this entry from?

@mifi
Copy link
Owner

mifi commented Nov 3, 2020

Correct me if I'm wrong, but I think the problem here is that you have two comma separated dates in exdate. It doesn't look like ical.js supports this. I have created an issue here: kewisch/ical.js#458

@rutledgek
Copy link
Author

Thanks. It is generated by our c# backend and does work for calendar software. I got the same error with a single item that was a single date without a time.

@radarfox
Copy link

radarfox commented Nov 3, 2020

EXDATE can have a list of values

https://tools.ietf.org/html/rfc5545#section-3.8.5.1

I would recommend you to use RecurExpansion from the Mozilla ICAL API, which should handle those cases.

@mifi
Copy link
Owner

mifi commented Nov 3, 2020

@radarfox ical.js seems to already support multiple values (see kewisch/ical.js#458). The problem seems to be that it doesn't support this short date format without a time. e.g. EXDATE:20201126 also crashes.

@mifi
Copy link
Owner

mifi commented Nov 3, 2020

I believe that iCal does indeed use 'T'. See for example this file:

EXDATE:20160808T080000Z

@radarfox
Copy link

radarfox commented Nov 3, 2020

Yes, I figured that out, I was confused by the format in the error message. Looks like you are right and the problem is in the date-only format.

@radarfox
Copy link

radarfox commented Nov 3, 2020

Anyway, I have spend a lot of time working with this library lately and I ended up refactoring it to a simple method which uses RecurExpansion and the parametrs of IcalExpander (after, before). It covers basicaly all the functionality of this library. I guess this class wasn't available in the API back then. So I would recommend you doing the same, instead of having to fix bugs like these.

@mifi
Copy link
Owner

mifi commented Nov 6, 2020

Cool! could you provide an example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants