Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Days #remaining #moment
ADD COMMENT
Topic
Name
1+5 =