- Instant help with your JavaScript coding problems

Check if date is today

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

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?"