Description
ics is a small JavaScript library that writes iCalendar files, the .ics format used by Apple Calendar, Google Calendar, Outlook and most other calendar apps. You describe an event by its attributes, such as its start time, and the library returns the iCalendar text as a string. The examples also show an event with an audio alarm. It works in Node.js with CommonJS or ES modules and can also be used in the browser. The library can create one event, a list of events with an optional calendar header, or a large batch through createEventsAsync, which yields to the event loop so that big lists do not block the process. Dates can be given as arrays such as [2000, 1, 5, 10, 0] or as Unix timestamps in milliseconds, and you choose whether the input and output are local or UTC. The API returns an { error, value } object by default, or accepts a Node-style callback. Install it with npm install ics.…
Highlights
- Creates single or multiple iCalendar events
- Async batch creation for large event lists
- Works in Node.js and in the browser
- Dates as arrays or Unix timestamps, local or UTC
- Optional alarms and calendar header
Ratings & Reviews
No ratings yet
Be the first to rate Ics.
People also visit
Add Event To Calendar Docs
Docs how to generate links to add events to online calendar services
Ics FAQ
What is ics used for?
It generates .ics calendar files from JavaScript or Node.js code, so an app can offer an 'add to calendar' file for events such as bookings, reminders or schedules.
How do I install it?
Run npm install ics in your project. The README shows examples for CommonJS, ES modules and in-browser use.
Can it create many events at once?
Yes. createEvents writes a list of events with an optional calendar header, and createEventsAsync does the same for large batches without blocking the event loop.
What does it return?
By default each call returns an object with error and value fields, where value holds the iCalendar string when there is no error. You can also pass a callback to receive the result in Node style.
Which fields are required?
Only start is required for a single event. Other fields such as end, title, location and description are optional, and dates can be written as an array or a Unix timestamp in milliseconds.
What are the best Ics alternatives?
Popular alternatives to Ics include ICal, Add Event To Calendar Docs and renCal. See all Ics alternatives





