Moment.js is a JavaScript library that allows its users to parse, validate, format, manipulate, and display dates.

There are maybe 10,000 ways to use dates in JavaScript but this method might appeal to you more than many others. It features a very low filesize, works in Node.js, Require.js, Bower, NuGet and spm. Also it supportsĀ a traditional browser-based script call.

 

Moment creates a wrapper for the date object. This wrapper is initiated by calling the moment() and an input type:

 

moment();

 

moment("Dec 25, 1995");

 

Moment supports possibly all things you would expect from manipulating and parsing dates:

  • Special formats
  • Timestamps
  • Arrays / JSON / ISO 8601
  • Cloning
  • Timzones
  • Validation
  • Duration
  • Queries
  • Multi-language support
  • Algebra
  • Plugins
  • and more…

 

 

Download & Learn Moment.JS

 

 



View More Tutorials

See more posts on tutorials.

Wordpress, PHP, JavaScript, jQuery, CSS, HTML, MYSQL and more!

Categorised As:Tutorials, Web Design
COMMENTS