From 50494bc796607131d013b8fb3d3d7a61c2eeacb1 Mon Sep 17 00:00:00 2001 From: kewisch Date: Thu, 11 Apr 2024 07:41:01 +0000 Subject: [PATCH] deploy: 022c9ab1cba95f626978a5a0faae3215c9d9ce74 --- api/index.html | 14 ++++++++++++-- validator.html | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/api/index.html b/api/index.html index 400ce01b..6881ae16 100644 --- a/api/index.html +++ b/api/index.html @@ -1,7 +1,17 @@ Home
On this page

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 Statusnpm versionCDNJS

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
+    
On this page

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 Statusnpm versionCDNJS

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

ICAL.js has no dependencies and is written in modern JavaScript. You can install ICAL.js via npm, if you would like to use it in Node.js:

npm install ical.js
+

Then simply import it for use:

import ICAL from "ical.js";
+

If you are working with a browser, be aware this is an ES6 module:

<script type="module">
+  import ICAL from "https://unpkg.com/ical.js";
+  document.querySelector("button").addEventListener("click", () => {
+    ICAL.parse(document.getElementById("txt").value);
+  });
+</script>
+

If you need to make use of a script tag, you can use the transpiled ES5 version:

<script src="https://unpkg.com/ical.js/dist/ical.es5.cjs"></script>
+<textarea id="txt"></textarea>
+<button onclick="ICAL.parse(document.getElementById('txt').value)"></button>
+

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.

This file is not included in the distribution since it pulls in IANA timezones that might change regularly. See the github actions on building your own timezones during CI, or grab a recent build from main.

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
diff --git a/validator.html b/validator.html
index 3fd1f265..02df07e5 100644
--- a/validator.html
+++ b/validator.html
@@ -31,7 +31,7 @@
       }