Gathering detailed insights and metrics for ical-generator
Gathering detailed insights and metrics for ical-generator
Gathering detailed insights and metrics for ical-generator
Gathering detailed insights and metrics for ical-generator
ics
iCal (ics) file generator
timezones-ical-library
Easy direct access to the most recent official timezone information for iCalendar files via JavaScript
@flowr-es/ical-generator
ical-generator is a small piece of code which generates ical calendar files
ical-toolkit
ICal generator/updater/parser with Timezone/DST, Alams, Organizers, Events, etc. support.
ical-generator is a small piece of code which generates ical calendar files
npm install ical-generator
Typescript
Module System
Min. Node Version
Node Version
NPM Version
88.5
Supply Chain
83.9
Quality
95.1
Maintenance
100
Vulnerability
99.6
License
v9.0.1-develop.5
Updated on Jul 04, 2025
v9.0.1-develop.4
Updated on Jun 25, 2025
v9.0.1-develop.3
Updated on Jun 18, 2025
v9.0.1-develop.2
Updated on May 31, 2025
v9.0.1-develop.1
Updated on May 28, 2025
v9.0.0-develop.8
Updated on May 20, 2025
TypeScript (98.98%)
JavaScript (0.85%)
CSS (0.18%)
Total Downloads
23,763,666
Last Day
5,719
Last Week
155,247
Last Month
684,426
Last Year
6,981,046
MIT License
806 Stars
1,881 Commits
166 Forks
9 Watchers
3 Branches
71 Contributors
Updated on Jul 04, 2025
Minified
Minified + Gzipped
Latest Version
9.0.0
Package Id
ical-generator@9.0.0
Unpacked Size
725.18 kB
Size
140.95 kB
File Count
17
NPM Version
10.5.0
Node Version
22.15.0
Published on
May 12, 2025
Cumulative downloads
Total Downloads
Last Day
7.5%
5,719
Compared to previous day
Last Week
-8.1%
155,247
Compared to previous week
Last Month
1.5%
684,426
Compared to previous month
Last Year
24.3%
6,981,046
Compared to previous year
8
38
ical-generator
is a small but fine library with which you can very easily create a valid iCal calendars, for example
to generate subscriptionable calendar feeds.
npm install ical-generator
1import ical, { ICalCalendarMethod } from 'ical-generator'; 2import http from 'node:http'; 3 4const calendar = ical({ name: 'my first iCal' }); 5 6// A method is required for outlook to display event as an invitation 7calendar.method(ICalCalendarMethod.REQUEST); 8 9const startTime = new Date(); 10const endTime = new Date(); 11endTime.setHours(startTime.getHours() + 1); 12calendar.createEvent({ 13 start: startTime, 14 end: endTime, 15 summary: 'Example Event', 16 description: 'It works ;)', 17 location: 'my room', 18 url: 'http://sebbo.net/', 19}); 20 21http.createServer((req, res) => { 22 res.writeHead(200, { 23 'Content-Type': 'text/calendar; charset=utf-8', 24 'Content-Disposition': 'attachment; filename="calendar.ics"', 25 }); 26 27 res.end(calendar.toString()); 28}).listen(3000, '127.0.0.1', () => { 29 console.log('Server running at http://127.0.0.1:3000/'); 30});
See the examples folder for more examples.
ical-generator supports native Date,
Day.js, Luxon's DateTime
and the older moment.js, moment-timezone
objects and TZDate. You can also pass a string which is then passed to javascript's Date
internally.
It is recommended to use UTC time as far as possible. ical-generator
will output all time information as UTC time as
long as no time zone is defined. For day.js, a plugin is necessary for this, which is a prerequisite. If a time zone is
set, ical-generator
assumes that the given time matches the time zone. If a time zone is used, it is also recommended
to use a VTimezone generator. Such a function generates a VTimezone entry and returns it. For example, ical-timezones can
be used for this:
1import { ICalCalendar } from 'ical-generator'; 2import { getVtimezoneComponent } from '@touch4it/ical-timezones'; 3 4const cal = new ICalCalendar(); 5cal.timezone({ 6 name: 'FOO', 7 generator: getVtimezoneComponent, 8}); 9cal.createEvent({ 10 start: new Date(), 11 timezone: 'Europe/London', 12});
If a moment-timezone
object or Luxon's setZone
method works, ical-generator
sets it according to the time zone set
in the calendar/event.
npm test
npm run coverage
It's here. If you need the changelog for
ical-generator
1.x.x and older, you'll find it here.
ReferenceError: TextEncoder is not defined
error (in some browsers)This library uses TextEncoder
, which
is available in node.js ≥ 11.0.0 and all modern browsers.
Outdated browsers may not have the necessary API and generate this error when generating the calendar.
Copyright (c) Sebastian Pekarek under the MIT license.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
30 commit(s) and 5 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
Reason
Found 0/10 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
10 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More