How to find the day of month in momentjs -
how can find day of month current moment date points to. on here iam trying invoke dayofmonth()
var compareday = function(ts1,ts2){ return (moment(ts1).dayofmonth() === moment(ts2).dayofmonth())?true:false; };
per documentation,
moment#date date of month, , moment#day day of week.
so believe want,
return moment(ts1).date() === moment(ts2).date();
Comments
Post a Comment