js-Joda
A high-performance, immutable date and time library for JavaScript
About js-Joda
js-Joda is a robust, immutable date and time library for JavaScript, offering a clean API based on the ISO calendar system. It provides efficient handling of dates, times, and time zones, with built-in parsers and formatters for ISO 8601. The library is lightweight, fast, and immutable, making it ideal for modern web applications and frameworks like React.
FAQ
You can install js-joda using npm by running the command 'npm install @js-joda/core'. Then, require it in your module using 'var LocalDate = require('@js-joda/core').LocalDate;'.
To use js-joda in a browser, download either 'dist/js-joda.min.js' or 'dist/js-joda.js' (with sourcemaps for development) from a CDN like 'https://cdn.jsdelivr.net/npm/@js-joda/core'. Then, add it as a script tag to your page and use it as shown in the example.
The js-joda library has a lightweight footprint of only 43 kB when minified and compressed.
Yes, js-joda is an immutable date and time library. This means that an existing instance is never changed, and all manipulating methods (plus, at, etc.) return new instances.
js-joda consists of four packages: '@js-joda/core' for the implementation of the ThreeTen Classes and API, '@js-joda/timezone' for timezone calculation, '@js-joda/locale' for locale-specific functionality, and '@js-joda/extra' for additional ThreeTen-Extra Classes and API.
You can create a LocalDate instance in several ways: using 'LocalDate.now()' to get the current date, 'LocalDate.parse("2016-02-23")' to parse an ISO 8601 formatted string, 'LocalDate.of(2016, 2, 23)' to create from year, month, and day, or 'LocalDate.ofEpochDay(-1)' to create from an epoch day.
js-joda is released under the BSD 3-clause license.
Yes, js-joda supports timezone calculations through the '@js-joda/timezone' package, which provides an implementation of the ZoneRulesProvider and contains the IANA timezone database.
Alternatives to consider
Community ratings & full listBadges
Promote js-Joda giving it more exposure, by adding these badges to your website, documentation, or product listing. Each badge links back to js-Joda page on Webfolio.
<a href="https://www.webfolio.to/tools/js-joda?utm_source=badge&utm_campaign=badge" target="_blank" rel="noopener noreferrer"><img src="https://www.webfolio.to/badges/featured_color.svg" alt="Featured on Webfolio" style="max-width: 150px" /></a>
Categories
Claim this tool
Are you the founder? Claim your profile to update details and track views.