Typescript ready date library alternative to Moment.js
Carbon.js is a minimalist JavaScript library that parses, validates, manipulates, and displays dates and times for modern browsers with a largely Moment.js-compatible API.
Table of Content
Features
- 🕒 Familiar Moment.js API & patterns
- 💪 Immutable
- 🔥 Chainable
- 🌐 I18n support
- ⚙️ Plugin support
- ⚙️ Calendar support (as part of plugin support)
Getting Started
Installation
npm i -s carbonjs
Usage
API
It's easy to use Carbon.js APIs to parse, validate, manipulate, and display dates and times.
; Carbon; // parse ; // display Carbon; // get & set ; // manipulate Carbon; // query
I18n
Day.js has great support for internationalization.
But none of them will be included in your build unless you use it.
; // load locale package on demand Carbon; // use Spanish locale globally Carbon; // use Chinese Simplified locale in a specific instance
Plugin
A plugin is an independent module that can be added to Day.js to extend functionality or add new features.
Carbon // use plugin Carbon // more available formats
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Authors
- Ardalan Amini - Owner/Developer - @ardalanamini
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE file for details
Support
If my work helps you, please consider