You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For this demo calendar: the output looks like this on a calendar reader:
But from various ical readers like ical.js, and its various forks, all I get is the first event, and nothing if the first events of a series starts in the past.
ical.js appears unmaintained, although it DOES use this rrule library, it appears locked to v2.4.1
On 2018-10-09, Event repeating monthly on 2nd tuesday at 10am
On 2018-10-10, Event repeating weekly on a Wednesday at 11am
On 2018-10-11, Single event on 11th October
Code is as below - a few extras as I'm not interested in dates in the past, and it's nice to have things in upcoming date order, rather than random
const ical = require('ical');
var dateNow = new Date();
const url = "https://calendar.google.com/calendar/ical/ssjqjrg27h9mqqctfnr5kscmrk%40group.calendar.google.com/public/basic.ics";
ical.fromURL(url, {}, function (err, data) {
var ttsorted = [];
for (const k in data) {
const ev = data[k];
const eventStart = new Date(ev.start);
if (data.hasOwnProperty(k)) {
if (eventStart.getTime() >= dateNow.getTime()) {
const tts = `On ${ev.start.toISOString().slice(0,10)}, ${ev.summary} `;
ttsorted.push(tts);
}
}
}
ttsorted.sort();
for (const events of ttsorted) {
console.log(events);
}
});
The text was updated successfully, but these errors were encountered:
Hi, this library can help with generating a series of Dates from an RRULE, but does not offer eg. other "extended" calendar scheduling functionality (eg contact info, location, etc.). What functionality specifically are you looking for?
Thank you - well, just as per the original post really, I need start time, description, location for recurring events. From what you have said, if it does not include location etc then this might not be of use.
This library covers a rather specialized subset of the ical spec, but could be used as a part of a full implementation. Start time is fine, but description and location you'll have to manage outside of this library. I recommend using a parser like https://github.com/mozilla-comm/ical.js/ to parse the data, and rrule can help out with generating recurrences from any RRULE string.
For this demo calendar: the output looks like this on a calendar reader:
But from various ical readers like ical.js, and its various forks, all I get is the first event, and nothing if the first events of a series starts in the past.
ical.js appears unmaintained, although it DOES use this rrule library, it appears locked to v2.4.1
Code is as below - a few extras as I'm not interested in dates in the past, and it's nice to have things in upcoming date order, rather than random
The text was updated successfully, but these errors were encountered: