JS Date Format & validate Library - Moment.js

File Size: 1.94 MB
Views Total: 14970
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
JS Date Format & validate Library - Moment.js

Moment.js is a lightweight and robust JavaScript date library that allows you to parse, validate, manipulate, and format dates & times.



  • dayjs: 2KB immutable date library alternative to Moment.js


$ npm install moment --save

Basic usage:

1. Import the Moment.js library.

// Webpack
var moment = require('moment');

// Typescript
import * as moment from 'moment';
<!-- From A CDN -->
<script src="https://cdn.jsdelivr.net/npm/moment@latest/moment.min.js"></script>
<!-- With Locals -->
<script src="https://cdn.jsdelivr.net/npm/moment@latest/min/moment-with-locales.min.js"></script>

2. Read the documentation for API.


v2.26.0 (2020-05-29)

  • Update

This awesome jQuery plugin is developed by timrwood. For more Advanced Usages, please check the demo page or visit the official website.