How can I check if two different date objects have the same date information(having same day, month, year ...)? I have tried "==", "===" and .equals but none seems to work.
You can use valueOf() or getTime():
valueOf()
getTime()
a = new Date(1995,11,17); b = new Date(1995,11,17); a.getTime() === b.getTime() // prints true
1.4m articles
1.4m replys
5 comments
56.9k users