momet js code example
Example 1: moment format date
moment().format();
moment().format("dddd, MMMM Do YYYY, h:mm:ss a");
moment().format("ddd, hA");
Example 2: momentjs
npm install moment --save # npm
yarn add moment # Yarn
moment.locale();
moment().format('LT');
moment().format('LTS');
moment().format('L');
moment().format('l');
moment().format('LL');
moment().format('ll');
moment().format('LLL');
moment().format('lll');
moment().format('LLLL');
moment().format('llll');
Example 3: moment js
moment().getDate();
Example 4: mometjs
moment('24/12/2019 09:15:00', "DD MM YYYY hh:mm:ss", true);