Skip to content

Enderchief/CalendarJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CalendarJS


Table of Contents


Installation

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

npm install icalendarts
yarn add icalendarts
bower install icalendarts

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published