How do I check a date is actually today (the same date) rather than the difference between hours in a day?
I have three timestamps as examples, one is today (22/07/1
You can use isSame(), limiting the granularity to a day:
isSame()
var today = moment(1406019110000); var yesterday = moment(1405951867000); if (today.isSame(yesterday, 'd')) { // They are on the same day } else { // They are not on the same day }