Skip to content

DTEND should be non-inclusive #15

Open
@radarfox

Description

@radarfox

Hello,

I have discovered the bug in this library at the latest version 2.1. According to the RFC at 3.6.1:

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

So for example, in this calendar:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:+//IDN ki-wi.cz//NONSGML Player Lighter//EN
BEGIN:VEVENT
UID:197857
DTSTAMP:20190920T025726Z
DTSTART:20200101T000000
DTEND:20201231T235900
SUMMARY:simple event
END:VEVENT
END:VCALENDAR

When you make a selection, that includes only the DTEND, it shouldn't contain any event or occurrences, but it does. DTEND + 1 works as expected and no event is returned.

const date = new Date('2020-12-31T23:59');
const match = expander.between(date, date);
return Boolean(match.events.length || match.occurrences.length);

This code will return true, but it should return false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions