Comments (3)
@jayjanssen got a similar issue but then realized there are different kinds of events like VEVENT and VTIMEZONE that are returned by the lib. In my case, skipping VTIMEZONE events made the trick.
from ical.js.
+1
from ical.js.
In case anyone is wondering, this fixes it, tidies things up, as well as stopping jsonhint complaining about the example code
'use strict';
const ical = require('ical');
const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
ical.fromURL('http://lanyrd.com/topics/nodejs/nodejs.ics', {}, function (err, data) {
for (let k in data) {
if (data.hasOwnProperty(k)) {
var ev = data[k];
if (data[k].type == 'VEVENT') {
console.log(`${ev.summary} is in ${ev.location} on the ${ev.start.getDate()} of ${months[ev.start.getMonth()]} at ${ev.start.toLocaleTimeString('en-GB')}`);
}
}
}
});
from ical.js.
Related Issues (20)
- Please consider republishing to npm HOT 2
- length is not defined exception when parsing
- camelCase rrule options
- 403: Forbidden For Airbnb iCal HOT 3
- No way to tell if an event is an all day event HOT 1
- Refactor ical, relocating parsing code into new module suitable for non-Node.js environments HOT 3
- if calendar data has linux line ends, parseICS doesn't parse data
- Recurring events created in DST are off by an hour after DST HOT 8
- Replace `request` lib with native http fetch or something lightweight HOT 4
- error parsing blank RRULE line
- Support ECMAScript module HOT 1
- want to add tests for fixing microsoft timezones, and timezones in general, but existing tests fail on test5 and test8
- windows timezones are not supported
- Automated dependency updates HOT 1
- Create new npm release after bump of rrule HOT 1
- Recurrences is declared as an array and used as an object
- Recurring exdates not picked up by parser. HOT 3
- Daylight saving not managed properly
- TypeError: self.getLineBreakChar is not a function HOT 1
- Incorrect parsing of quoted-value
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ical.js.