moment now

70

moment().format();                                // "2014-09-08T08:02:17-05:00" (ISO 8601, no fractional seconds)
moment().format("dddd, MMMM Do YYYY, h:mm:ss a"); // "Sunday, February 14th 2010, 3:25:50 pm"
moment().format("ddd, hA");                       // "Sun, 3PM"
moment('gibberish').format('YYYY MM DD');         // "Invalid date"
moment.locale();         // en
moment().time();   // 3:04 PM
moment().format('LTS');  // 3:04:12 PM
moment().format('L');    // 06/24/2022
moment().format('l');    // 6/24/2022
moment().format('LL');   // June 24, 2022
moment().format('ll');   // Jun 24, 2022
moment().format('LLL');  // June 24, 2022 3:04 PM
moment().format('lll');  // Jun 24, 2022 3:04 PM
moment().format('LLLL'); // Friday, June 24, 2022 3:04 PM
moment().format('llll'); // Fri, Jun 24, 2022 3:04 PM

Comments

Submit
0 Comments