npm momnet code example
Example 1: npm momen
npm i moment
Example 2: moment js print date
moment(testDate).format('MM/DD/YYYY');
Example 3: npm moment
moment().format('MMMM Do YYYY, h:mm:ss a'); // March 5th 2021, 11:30:49 am
moment().format('dddd'); // Friday
moment().format("MMM Do YY"); // Mar 5th 21
moment().format('YYYY [escaped] YYYY'); // 2021 escaped 2021
moment().format('YYYY MM DD'); // 2021-03-05T11:30:49+05:30