Answers for "how to get current time using moment"

0

how to get current time using moment

var startDate = moment().subtract(1, 'days'); //one day before the current time
Posted by: Guest on February-22-2021
0

moment.js get time from now

moment("20111031", "YYYYMMDD").fromNow(); // 10 years ago
moment("20120620", "YYYYMMDD").fromNow(); // 9 years ago
moment().startOf('day').fromNow();        // 15 hours ago
moment().endOf('day').fromNow();          // in 9 hours
moment().startOf('hour').fromNow();       // an hour ago
Posted by: Guest on June-01-2021

Code answers related to "how to get current time using moment"

Code answers related to "Javascript"

Browse Popular Code Answers by Language