I go through moment.js docs but not able to find if a date is previous date,
ex 1
var date='2018/09/28';
//now I want to compare this with today's date
var today = moment(new Date()).format('YYYY/MM/DD');
this should return true
ex 2
var date='2018/10/02';
//now I want to compare this with today's date
var today = moment(new Date()).format('YYYY/MM/DD');
this should return false;
I acheived this with javascript,
// I splitted days, months and year and compare with each other
but I want to know if there is something in moment to reduce my line of code?