diff --git a/samples/recur_instances.ics b/samples/recur_instances.ics index 833f29b3..52b8320f 100644 --- a/samples/recur_instances.ics +++ b/samples/recur_instances.ics @@ -25,6 +25,8 @@ BEGIN:VEVENT UID:623c13c0-6c2b-45d6-a12b-c33ad61c4868 DESCRIPTION:IAM FOO RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=1TU +RDATE:20231123T090000Z +RDATE;VALUE=PERIOD:20231125T090000Z/20231125T123000Z SUMMARY:Crazy Event Thingy! ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Sahaja Lal;X-NUM-GUESTS=0:mailto:calmozilla1@gmail.com diff --git a/test/recur_expansion_test.js b/test/recur_expansion_test.js index eb5d37d1..dd016c7e 100644 --- a/test/recur_expansion_test.js +++ b/test/recur_expansion_test.js @@ -87,12 +87,16 @@ suite('recur_expansion', function() { let expected = [ new Date('2012-11-05T18:00:00.000Z'), new Date('2012-11-10T18:00:00.000Z'), - new Date('2012-11-30T18:00:00.000Z') - ]; + new Date('2012-11-30T18:00:00.000Z'), + // RDATEs + new Date('2023-11-23T09:00:00.000Z'), + new Date('2023-11-25T09:00:00.000Z') + ]; let dates = subject.ruleDates.map(function(time) { - return time.toJSDate(); + // We have a period in here, take the start date + return (time.start || time).toJSDate(); }); assert.deepEqual(dates, expected); diff --git a/test/time_test.js b/test/time_test.js index 59dd9879..5aac2d39 100644 --- a/test/time_test.js +++ b/test/time_test.js @@ -1632,7 +1632,6 @@ suite('icaltime', function() { end: Time.fromString("1970-01-02T03:04:07Z") }); - let dt = Time.fromString('1970-01-02T03:04:05Z'); assert.equal(dt.compare(periodbefore), 1);