https://github.com/cwlsn/ics-to-json
📅 Convert ICS calendars (eg. Google Calendar) to an opinionated JSON format.
https://github.com/cwlsn/ics-to-json
converter google-calendar ical ics json
Last synced: 6 months ago
JSON representation
📅 Convert ICS calendars (eg. Google Calendar) to an opinionated JSON format.
- Host: GitHub
- URL: https://github.com/cwlsn/ics-to-json
- Owner: cwlsn
- License: mit
- Created: 2018-04-11T23:52:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-03-25T14:07:19.000Z (6 months ago)
- Last Synced: 2025-03-29T17:09:40.597Z (6 months ago)
- Topics: converter, google-calendar, ical, ics, json
- Language: TypeScript
- Size: 4.07 MB
- Stars: 51
- Watchers: 5
- Forks: 20
- Open Issues: 11
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
---
Convert the ICS calendar format to JSON data to consume in web apps.
## Usage
```js
import { icsToJson } from 'ics-to-json';// Get ICS text however you like, example below
// Make sure you have the right CORS settings if needed
const convert = async (fileLocation) => {
const icsRes = await fetch(fileLocation);
const icsData = await icsRes.text();
// Convert
const data = icsToJson(icsData);
return data;
};
```## Format
Result is an array of:
```js
{
startDate: '20180505T020000Z',
endDate: '20180505T060000Z',
description: 'Big Event!',
location: 'The place!',
summary: 'Summary!'
}
```## Upcoming
- Ability to reverse conversion
- Include the rest of the keys from the ICS format