From the course: JavaScript for Web Designers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Filling in gaps with Moment.js

Filling in gaps with Moment.js - JavaScript Tutorial

From the course: JavaScript for Web Designers

Start my 1-month free trial

Filling in gaps with Moment.js

- [Instructor] If you felt like writing all that code to handle dates and times was maybe just slightly tedious, you are not alone. In the grand scheme of things, it wasn't a ton of code, but if you were working with dates and times a great deal, you would probably want something to help. We're going to look at a couple of third party libraries that are very helpful for working with dates and times and try using one of them. Probably the most popular library for dates and times in javascript is moment.js. It can do almost anything you could possibly want and just like it says here, it can parse, validate, manipulate and display dates and times in javascript. It can deal with timezones for you, do almost anything you want. There's also another smaller library, just called Date and Time. This is the one we'll be using in this example because it's much smaller and it's very focused. And it happens to be exactly what we need for…

Contents