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

Popular posts from this blog

html - jquery - p element wont show after I hid it -

python - BeautifulSoup: How to get the nearest tag -

php - Return Last Insert ID with PDO -