npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details


  • User packages



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.


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 🙏

© 2024 – Pkg Stats / Ryan Hefner




Easy direct access to the most recent official timezone information for iCalendar files via JavaScript




Add to Calendar TimeZone iCal Library

Codacy Grade Build Status npm Installations GitHub license

Add to Calendar TimeZones iCal Library

The tool to convert the IANA (formerly Olson) time zone database files into VTIMEZONE blocks, compatible with the iCalendar specification (RFC2445).

It is based on the awesome tool by Damon Chaplin (, but only provides the VTIMEZONE part to easily put this into any other iCal generator (like the add-to-calendar-button). It is built to be used standalone or as JavaScript module, hosted as npm package.

📦 Installation / Setup

0. Update it (not required)

This step is only relevant if you want to build the package and data on your own and from source! (Requires Node.js as well as Linux as operating system.) Run ...

sudo sh tzVersionNumber

... with tzVersionNumber being the version of the IANA time zone database you want to use (e.g. sudo sh 2023c).

1. Load it

Install the package via npm with:

npm install timezones-ical-library

After the installation:

  • require the package (commonJS) or ...
  • import the module (ES) via import { tzlib_get_ical_block, tzlib_get_offset, tzlib_get_timezones } from 'timezones-ical-library';.

2. Use it

A. Get time zones

Use tzlib_get_timezones() to retrieve a list of all available time zone strings. You can pass true to retrieve a JSON formatted string instead of an array.

B. Get the iCal time zone block

Use the tzlib_get_ical_block(tzName) function to return the proper iCal VTIMEZONE block for a given time zone string (tzName). Again, pass true to retrieve a JSON formatted string instead of an array (not recommended).

You will receive an array, holding the VTIMEZONE block first, and the TZID line (additionally) second. The latter one is needed for any further time statement.

Include this into your further iCal data to come up with a complete ics file.

A final constellation could look like this:

SUMMARY:A sample event
DESCRIPTION:Just some descriptive text...
LOCATION:World Wide Web

C. Get a specific offset

Use tzlib_get_offset(tzName, isoDate, isoTime) to get specific offset (relative to UTC), based on a provided date and time.

For example, you can provide tzName 'Europe/Berlin', isoDate '2023-05-23', and isoTime '15:45' in order to retrieve the offset, which applies for this time zone at the 23rd of May in 2023 at exactly 15:45.

⚙️ API

Instead of using this code or the npm package, you could also make use of the free and open API.

Getting a list of all zone names

Getting the ics part of a respective zone

With %zoneName% being your time zone. So, for New York, this would be This is case sensitive!

(Mind that this does not deliver a fully valid ics file, since it only contains the VTIMEZONE part. You will need to combine this with your other event information.)

🙌 Contributing

Anyone is welcome to contribute, but mind the guidelines:

📃 Copyright and License

Copyright (c) Jens Kuerschner.

Licensed under Apache-2.0.

⚡ Changelog (without minor changes and fixes)

npm version

  • v1.8 : database update (2024a)
  • v1.7 : database update (2023c)
  • v1.6 : database update (2022g)
  • v1.5 : new dist structure
  • v1.4 : further minification via data mapping
  • v1.3 : bundle size optimization and API
  • v1.2 : providing tzblock as array with separate tzid
  • v1.1 : get-offset function
  • v1.0 : initial release

💜 Kudos go to