Answers for "Days remaining using moment"

0

Days remaining using moment

var given = moment("2018-03-10", "YYYY-MM-DD");
var current = moment().startOf('day');

//Difference in number of days
moment.duration(given.diff(current)).asDays();
Posted by: Guest on July-09-2021

Browse Popular Code Answers by Language