moment js
npm install moment --save # npm
yarn add moment # Yarn
Install-Package Moment.js # NuGet
spm install moment --save # spm
meteor add momentjs:moment # meteor
bower install moment --save # bower (deprecated)
moment js
moment().format('MMMM Do YYYY, h:mm:ss'); // January 14th 2022, 10:29:57 am
moment().format('dddd'); // Friday
moment().format("MMM Do YY"); // Jan 14th 22
moment().format('YYYY [escaped] YYYY'); // 2022 escaped 2022
moment().format(); // 2022-01-14T10:29:57+05:00
moment js
moment().format('ddmmyyyyhhmmss'); // May 6th 2021, 2:30:08 pm // 2021-05-06T14:30:08+05:30
moment js
moment().format('MMMM Do YYYY, h:mm:ss'); // March 24th 2021, 4:03:03 pm
moment().format('dddd'); // Wednesday
moment().format("MMM Do YY"); // Mar 24th 21
moment().format('YYYY [escaped] YYYY'); // 2021 escaped 2021
moment().format(); // 2021-03-24T16:03:03-03:00
moment js
moment().format('MMMM Do YYYY, h:mm:ss'); // March 24th 2021, 4:02:53 pm
moment().format('dddd'); // Wednesday
moment().format("MMM Do YY"); // Mar 24th 21
moment().format('YYYY [escaped] YYYY'); // 2021 escaped 2021
moment().format(); // 2021-03-24T16:02:53-03:00
moment js
npm install moment --save # npm
yarn add moment # Yarn
Install-Package Moment.js # NuGet
spm install moment --save # spm
meteor add momentjs:moment # meteor
bower install moment --save # bower (deprecated)
moment js
moment().subtract(Number, String);
moment().subtract(Duration);
moment().subtract(Object);
moment js
yarn add moment
moment js
moment().format('MMMM Do YYYY, h:mm:ss'); // January 14th 2022, 10:30:17 am
moment().format('dddd'); // Friday
moment().format("MMM Do YY"); // Jan 14th 22
moment().format('YYYY [escaped] YYYY'); // 2022 escaped 2022
moment().format(); // 2022-01-14T10:30:17+05:00
|