tritech / node-icalendar

iCalendar parser and generator for Node.js
MIT License
234 stars 50 forks source link

Improve README example #31

Open rlaferla opened 9 years ago

rlaferla commented 9 years ago

Please add the requires() line and also explain the argument to VEvent. Is it a UUID? Is it required to generate a unique id or is it optional? Perhaps the constructor could generate one and then you could query the object for the id?

var event = new icalendar.VEvent('cded25be-3d7a-45e2-b8fe-8d10c1f8e5a9');
event.setSummary("Test calendar event");
event.setDate(new Date(2011,11,1,17,0,0), new Date(2011,11,1,18,0,0));
event.toString();