- Instant help with your JavaScript coding problems

Check if date is today

How to check if date is today?
new Date().toDateString() === testDate.toDateString()

If you want to check if a given Date is today then simply use the toDateString() method. The toDateString() method returns the date portion of a Date object

Share "How to check if date is today?"