Category: Moment JS
-
Date Validation
MomentJS handles date validation in an easy way. You need not write lots of code to validate date. isValid() is the method available on moment which tells if the date is valid or not. MomentJS also provides many parsing flags which can be used to check for date validation. Parsing Flags MomentJS provides the following parsing flags in…
-
Parsing Date and Time
MomentJS has many easy to use methods which helps in parsing Date and Time. It can parse dates in the form of object, string, array, JavaScript native date object etc. This chapter discusses them in detail. Parsing Date MomentJS gives wrapper object as output when moment() is called. You can observe the following when you console the…
-
Introduction
In this chapter, we will discuss how to work with MomentJS using RequireJS and MomentJS and TypeScript. MomentJS and RequireJS To understand the working of MomentJS using RequireJS, let us analyze a working example with MomentJS and RequireJS. The folder structure of the corresponding app is shown in the following image − You can obtain the require.js file…
-
Environment Setup
In this chapter, you will learn in detail about setting up the working environment of MomentJS on your local computer. Before you begin with working on MomentJS, you need to have the access to the library. You can access its files in any of the following methods − Method 1: Using MomentJS File in Browser…
-
Overview
MomentJS is a JavaScript library which helps is parsing, validating, manipulating and displaying date/time in JavaScript in a very easy way. This chapter will provide an overview of MomentJS and discusses its features in detail. Moment JS allows displaying of date as per localization and in human readable format. You can use MomentJS inside a…
-
Tutorial
MomentJS is a JavaScript library which helps is parsing, validating, manipulating and displaying date and time in JavaScript in a very easy way. MomentJS can be used directly inside a browser and also with Node.js. Working with dates and time using JavaScript can be quite challenging, specifically if you have lots of manipulation to be…