npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kamkam1_0/datebook

v1.5.9

Published

DateBook is simple to use module that allows you to create .ics files.

Readme

DateBook

DateBook is simple to use module that allows you to create .ics files.

Installation

npm install @kamkam1_0/datebook

Functionalities

  • Create a .ics file
  • Get the buffer of that .ics file
  • Get the text of that .ics file
  • Download that ics file

How to use

Accepted date formats

  • 1990/01/01
  • 01/01/1990
  • 1990-01-01
  • 01-01-1990
  • 1990/01/01T00:00:00
  • 01/01/1990T00:00:00
  • 1990-01-01T00:00:00
  • 01-01-1990T00:00:00

Required infos

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()
.AddStart("01/01/1990T09:00:00")
.AddEnd("01/01/1990T19:00:00")
.AddTitle("Work")

Optional Infos

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()
.AddDescription("This is a description")
.AddGeo("48.861919983985295, 2.3379453552360845")
.AddLocation("91, Rue de Rivoli, 75001 Paris")
.SetTimeZone('Europe/Paris')

Recurrence

Frequencies

  • hourly
  • daily
  • weekly
  • monthly
  • yearly

You can add two types of recurrence.

You can add one until a specific date.

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()
.AddRecurrence("daily", "02/01/1990")

You can also add a recurrence for a precise number of time.

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()
.AddRecurrence("daily", "2")

Download

There are different ways you can get the infos of your calendar.

Download name

You have the possiblity to add a name to the file that will be created. By default, the name of the file is the date of the event.

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()
Calendar.AddDownloadName("#name")//->01/01/1990-name.ics
Calendar.AddDownloadName("name")//->name.ics

Get the infos without downloading

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()

Calendar.toText()
Calendar.toBuffer()
Calendar.downloadInfos()//Gives you the infos based on the simulation of the download-> {name: "01/01/1190", extension: "ics", buffer}

Downloading

There are three ways to download a file.

You can simply download the file in the directory of the process.

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()
Calendar.download()

You can also indicate, based on the process directory, the path to follow.

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()
Calendar.download("/ics")

Finally, you can indicate the entire path to follow.

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()
Calendar.download("/Users/johndoe/Desktop/Dev/Bot")

Grouping Calendars

With datebook.js, you can choose to group several calendars into one. You can add a name to your grouped calendar (optional).

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()
let Calendar2 = new DateBook.Calendar()

let groupedCalendar = Datebook.joinCalendars([Calendar, Calendar2])
//OR
let groupedCalendar = Datebook.joinCalendars([Calendar.toText(), Calendar2])
//OR
let groupedCalendar = Datebook.joinCalendars([Calendar, Calendar2], "sport")
//OR
let groupedCalendar = Datebook.joinCalendars([Calendar.toText(), Calendar2], "sport")

Downloading a grouped Calendar

The path for the download follows the same process as the "traditional path" mentionned above.

const DateBook = require("@kamkam1_0/datebook")
let groupedCalendar = Datebook.joinCalendars([Calendar, Calendar2])
groupedCalendar.download(groupedCalendar, "path")

Getting the downlaod informations about the grouped calendar

const DateBook = require("@kamkam1_0/datebook")
let groupedCalendar = Datebook.joinCalendars([Calendar, Calendar2])
groupedCalendar.downloadInfos(groupedCalendar, "path")

Getting the buffer of the grouped calendar

const DateBook = require("@kamkam1_0/datebook")
let groupedCalendar = Datebook.joinCalendars([Calendar, Calendar2])
groupedCalendar.toBuffer(groupedCalendar)