momment.js code example
Example 1: momentjs
npm install moment --save
yarn add moment
moment.locale(); // en
moment().format('LT'); // 8:49 AM
moment().format('LTS'); // 8:49:26 AM
moment().format('L'); // 10/13/2020
moment().format('l'); // 10/13/2020
moment().format('LL'); // October 13, 2020
moment().format('ll'); // Oct 13, 2020
moment().format('LLL'); // October 13, 2020 8:49 AM
moment().format('lll'); // Oct 13, 2020 8:49 AM
moment().format('LLLL'); // Tuesday, October 13, 2020 8:49 AM
moment().format('llll'); // Tue, Oct 13, 2020 8:49 AM
Example 2: javascript moment
m = moment('2013-03-01', 'YYYY-MM-DD')
Example 3: momentjs
npm install moment --save
yarn add moment
Install-Package Moment.js
spm install moment --save
meteor add momentjs:moment
bower install moment --save