Answers for "moment js day set with string"

6

moment js add day

var new_date = moment(startdate, "DD-MM-YYYY").add(5, 'days');
Posted by: Guest on May-15-2020
0

moment format date

moment("20111031", "YYYYMMDD").fromNow(); // 9 years ago
moment("20120620", "YYYYMMDD").fromNow(); // 9 years ago
moment().startOf('day').fromNow();        // 12 hours ago
moment().endOf('day').fromNow();          // in 12 hours
moment().startOf('hour').fromNow();       // 26 minutes ago
Posted by: Guest on March-26-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language