icalendarts
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

CalendarJS


Table of Contents


Installation

This package was built using node v10.24.0. To install with node

npm install cal-js
yarn add cal-js
bower install cal-js

Usage

CalendarJS is written in Typescipt and takes full advantage of the typing it brings. The best experience would be in TypeScript but Javascript still works fine.

Javascript

const { Calendar } = require("icalendarts");

const events = [
  {
    start: new Date(1640304000),
    end: new Date(1641081599),
    summary: "Holidays!",
    description: "Christmas to the end of New Years",
  },
  {
    start: new Date(1641120300),
    end: new Date(1641153600),
    summary: "First Meeting",
    description: "Talk to them about boring work stuff"
  },
];

const calendar = new Calendar(events);
// Get output with calendar.build()

Typescript

import { Calendar, types } from "icalendarts";

const events: types.CalArgs[] = [
  {
    start: new Date(1640304000),
    end: new Date(1641081599),
    summary: "Holidays!",
    description: "Christmas to the end of New Years",
  },
  {
    start: new Date(1641120300),
    end: new Date(1641153600),
    summary: "First Meeting",
    description: "Talk to them about boring work stuff"
  },
];

const calendar = new Calendar(events);
// Get output with calendar.build()

Purpose of this library


Mini-Documentation


License

Package Sidebar

Install

npm i icalendarts

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

16.5 kB

Total Files

17

Last publish

Collaborators

  • endercheif