Moment.js is a widely used JavaScript library for handling dates, times, and time zones. It provides a comprehensive set of functions for parsing, manipulating, formatting, and displaying dates and times.
With Moment.js, you can perform various operations such as:
1. Parsing and formatting: Moment.js allows you to parse date and time strings into JavaScript Date objects and format dates and times into different string representations.
2. Manipulation: You can add or subtract time units (years, months, days, hours, etc.) from dates and perform various manipulations like setting specific components (year, month, day, etc.) of a date.
3. Display and formatting: Moment.js provides a wide range of options for formatting dates and times according to your desired display format, including localized formatting options.
4. Time zone support: Moment.js includes functionality for handling time zones, converting between different time zones, and displaying dates and times in specific time zones.
Install :
npm install moment --save # npm
yarn add moment # Yarn
Install-Package Moment.js # NuGet
spm install moment --save # spm
meteor add momentjs:moment # meteor
bower install moment --save # bower (deprecated)
For More Info & Config : https://momentjs.com/