icalendar / icalendar

icalendar.rb main repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DTEND is parsed incorrectly

tfreedman opened this issue · comments

A calendar event spanning one full year (all day, no times) should have a DTSTART value of XXXX-01-01, and a DTEND value of (XXXX+1)-01-01, which represents January 01 - December 31.

Per the icalendar spec, "The "DTEND" property for a "VEVENT" calendar component specifies the non-inclusive end of the event".

Right now, parsing an event's dtend (e.g. e.dtend.beginning_of_day) would return Jan 01 @ 00:00:00, which is incorrect.

Tested with icalendar 2.7.1.

From this example, I assume that e.dtend is Jan 1, correct? Isn't that accurate per the ical spec? (non-inclusive)

Seems to be parsing correctly. Invoking beginning_of_day on a date that is non-inclusive seems to be the problem, which isn't the responsibility of the gem? Posed differently: what date would you expect e.dtend to be parsed as, if not Jan 1?

Closing as inactive, please re-open if this is still an issue.

I have the same question as jasonkarns about what date you were expecting dtend to be.