{"repo":"add2cal/timezones-ical-library","free":true,"listed":false,"github":"https://github.com/add2cal/timezones-ical-library","clone":"git clone https://github.com/add2cal/timezones-ical-library.git","description":"Easy direct access to the most recent official time zone information for iCalendar files via JavaScript/Typescript.","language":"C","stars":19,"topics":["ical","icalendar","timezone","builder","calendar","component","generator","iana","ics","javascript"],"license":"Apache-2.0","category":"productivity","readme_excerpt":"Add to Calendar Time Zones iCal Library Convert the IANA (formerly Olson) time zone database files into VTIMEZONE blocks, compatible with the iCalendar specification (RFC2445). It is based on vzic, 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, via API, or as JavaScript/TypeScript module, hosted as npm package. --- 📦 Installation / Setup 0. Update it Learn more (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. You would also need to load/include it manually into your codebase.) Run ... - with tzVersionNumber being the version of the IANA time zone database you want to use (e.g. sudo sh scripts/update-tzdata.sh 2026c ); - and rebuildVzic as an optional param to rebuild the vzic library from scratch (e.g. sudo sh scripts/update-tzdata.sh 2026c true ). 1. Install it 2. Import it For CommonJS: With ES: 3. 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. For CommonJS, you would use tzLib.tzlib get timezones() . 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","default_branch":null,"files":null,"tree":[],"storefront":"/r/add2cal","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/add2cal/timezones-ical-library/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}