• Stars
    star
    995
  • Rank 46,046 (Top 1.0 %)
  • Language
    JavaScript
  • License
    Mozilla Public Li...
  • Created over 12 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Javascript parser for ics (rfc5545) and vcard (rfc6350) data

ical.js - Javascript parser for iCalendar, jCal, vCard, jCard.

This is a library to parse the formats defined in the following rfcs and their extensions:

The initial goal was to use it as a replacement for libical in the Mozilla Calendar Project, but the library has been written with the web in mind. This library enables you to do all sorts of cool experiments with calendar data and the web. Most algorithms here were taken from libical. If you are bugfixing this library, please check if the fix can be upstreamed to libical.

Build Status Coverage Status npm version CDNJS

Sandbox and Validator

If you want to try out ICAL.js right now, there is a jsfiddle set up and ready to use. Read on for documentation and example links.

There is also a validator that demonstrates how to use the library in a webpage in the tools/ subdirectory.

Try the validator online, it always uses the latest release of ICAL.js.

Installing

You can install ICAL.js via npm, if you would like to use it in Node.js:

npm install ical.js

ICAL.js has no dependencies and is written in modern JavaScript. A version transpiled to ES5 is available as well. It should work in all versions of Node.js and modern browsers.

Timezones

The stock ical.js does not register any timezones, due to the additional size it brings. If you'd like to do timezone conversion, and the timezone definitions are not included in the respective ics files, you'll need to use ical.timezones.js or its minified counterpart.

Documentation

For a few guides with code samples, please check out the wiki. If you prefer, full API documentation is available here. If you are missing anything, please don't hesitate to create an issue.

Developing

To contribute to ICAL.js you need to set up the development environment. A simple npm install will get you set up. If you would like to help out and would like to discuss any API changes, please feel free to create an issue.

Tests

The following test suites are available

npm run test-unit         # Node unit tests
npm run test-acceptance   # Node acceptance tests
npm run test-performance  # Performance comparison tests
npm run test-browser      # Browser unit and acceptance tests

npm run test              # Node unit and acceptance tests (This is fast and covers most aspects)
npm run test-all          # All of the above

See the wiki for more details.

Code coverage is automatically generated for the node unit tests. You can view the coverage results online, or run them locally to make sure new code is covered.

Linters

To make sure all ICAL.js code uses a common style, please run the linters using npm run lint. Please make sure you fix any issues shown by this command before sending a pull request.

Documentation

You can generate the documentation locally, this is also helpful to ensure the jsdoc you have written is valid. To do so, run npm run jsdoc. You will find the output in the docs/api/ subdirectory.

Packaging

When you are done with your work, you can run npm run build to create the single-file build for use in the browser, including its minified counterpart and the source map.

License

ical.js is licensed under the Mozilla Public License, version 2.0.

More Repositories

1

gdata-provider

Provider for Google Calendar
JavaScript
238
star
2

sepa.js

Create and validate SEPA XML transactions
JavaScript
72
star
3

quickmove-extension

Quick Folder Move Add-on for Thunderbird
JavaScript
53
star
4

action-web-ext

A GitHub Action to run web-ext commands
JavaScript
35
star
5

pyamo

python tools for addons.mozilla.org
Python
8
star
6

fhemics

Exports the FHEM heating schedule as an .ics (rfc5545) compatible calendar file.
Perl
4
star
7

filelink-webdav

Adds the possibility to use a WebDAV store for Filelink
JavaScript
4
star
8

crutool

Python Tool for JIRA, Crucible and Fisheye
Python
4
star
9

ics-inspector

https://addons.mozilla.org/addon/ics-inspector/
JavaScript
3
star
10

ideal-size

Resize the window to the most ideal size for the page you are on
JavaScript
2
star
11

chromatasks-extension

Chromatasks for Thunderbird
CSS
2
star
12

amo-helper

https://addons.mozilla.org/firefox/addon/amo-queue-helper/
JavaScript
2
star
13

lightning-connector-automation

OBM Lightning Connector profile automation and testing using mozprofile/mozrunner/mozmill
Python
2
star
14

amoid

Convert between the various AMO identifier formats
JavaScript
2
star
15

jirablueprint

Tool to create JIRA issues via YAML template files.
Python
2
star
16

mozblocklist

Checks the blocklist for existing guids
JavaScript
1
star
17

wx-testbed-extension

Extension to test WebExtension API Support
JavaScript
1
star
18

iframe-sandbox-poc

iframe-sandbox-poc
JavaScript
1
star
19

amo-query-apps-script

Google Apps Script for AMO queries
JavaScript
1
star
20

indico-cli

Python
1
star
21

locationmap-extension

Show a Location Map in the Event Dialog in Lightning
JavaScript
1
star