Moment.js

At some point it’s well known that working with date values may develop into a difficult process no matter what language you use, so that’s why we decided to explain a bit this useful JavaScript library.
Here is the quick tour of Moment.js

The tool reached to it’s 2.0 version, and is available on the Moment.js web site where it provides the comple version (44 kb) and the 5,5 kb tiny version. This library is available under the terms of MIT license and is free of charge. It has been designed to work both on Node.JS and in the browser and all code is going to work in both environments.

The ” gear up process ” is easy, all that is required is to include the downloaded library into your page or other JavaScript, so with few clicks everything is set up and running.
How to use Moment.js!

The crucial point of working with the Moment.js library is the moment object as it is used for pretty much everything. An instance of the moment object is created and everything is good to go. Suports brower
Offers support for Node.JS, Browser, AMD module such as requirejs format.

Features:

  • Functions like Manipulate, Subtract and Add
  • Easy to get the properties of the Date object, Getter & Setter
  • Universe Parser, String, Unix time, Date, Asp.NET, JSON Date etc

In the end we can add up the fact that the library offers a great number of formatting options for displaying values to meet any demands.
Via jsFiddle we can test and play with moment.js. A good resource for it is the CloudFlare website, which offers a CDN for a wide range of JavaScript libraries, for this import the library into the page within jsFiddle.