import moment in javascript code example
Example 1: moment
moment().format('MMMM Do YYYY, h:mm:ss a'); // May 22nd 2020, 6:00:23 pm
moment().format('dddd'); // Friday
moment().format("MMM Do YY"); // May 22nd 20
moment().format('YYYY [escaped] YYYY'); // 2020 escaped 2020
moment().format(); // 2020-05-22T18:00:23+05:30
Example 2: javascript moment
m = moment('2013-03-01', 'YYYY-MM-DD')
Example 3: moment to javascript date
let now = moment()
let now = now.toDate()