Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Javascript date library alternative to Moment.js with the same modern API
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.
npm i -s carbonjs
It's easy to use Carbon.js APIs to parse, validate, manipulate, and display dates and times.
import * as Carbon from "carbonjs";
Carbon.parse("2018-08-08"); // parse
new Carbon().format("{YYYY} MM-DDTHH:mm:ss SSS [Z] A"); // display
Carbon.parse().set("month", 3).month(); // get & set
new Carbon().add(1, "year"); // manipulate
Carbon.parse().isBefore(Carbon.parse()); // query
Day.js has great support for internationalization.
But none of them will be included in your build unless you use it.
import "carbonjs/lib/locales/es"; // load locale package on demand
Carbon.locale("es"); // use Spanish locale globally
Carbon.parse("2018-05-05").locale("zh-cn").format(); // use Chinese Simplified locale in a specific instance
A plugin is an independent module that can be added to Day.js to extend functionality or add new features.
import * as advancedFormat from 'carbonjs/lib/plugins/advancedFormat' // load on demand
Carbon.extend(advancedFormat) // use plugin
Carbon.parse().format('Q Do k kk X x') // more available formats
:books:Full API Reference
We use SemVer for versioning. For the versions available, see the tags on this repository.
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details
If my work helps you, please consider
FAQs
Javascript date library alternative to Moment.js with the same modern API
The npm package carbonjs receives a total of 62 weekly downloads. As such, carbonjs popularity was classified as not popular.
We found that carbonjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.