You can use valueOf()
or getTime()
:
a = new Date(1995,11,17);
b = new Date(1995,11,17);
a.getTime() === b.getTime() // prints true
More Related Contents:
- JavaScript Date Comparisons Don’t Equal [duplicate]
- Determining Date Equality in Javascript
- JavaScript convert date format [duplicate]
- How do I get the current date in JavaScript?
- What are valid Date Time Strings in JavaScript?
- Detecting an “invalid date” Date instance in JavaScript
- How to add number of days to today’s date? [duplicate]
- JavaScript function to add X months to a date
- jQuery UI DatePicker to show month year only
- Convert dd-mm-yyyy string to date
- Getting current date and time in JavaScript
- How do I pre-populate a jQuery Datepicker textbox with today’s date?
- javascript to find leap year
- How to parse a date in format “YYYYmmdd” in JavaScript?
- Date parsing in javascript is different between safari and chrome
- How to format a Date in MM/dd/yyyy HH:mm:ss format in JavaScript? [duplicate]
- Converting Excel Date Serial Number to Date using Javascript
- Calculate the date yesterday in JavaScript
- How to get the hours difference between two date objects? [duplicate]
- How do I specify the time zone when creating a JavaScript Date?
- Easiest way to convert month name to month number in JS ? (Jan = 01)
- Detect timezone abbreviation using JavaScript
- Get current date in DD-Mon-YYY format in JavaScript/Jquery
- Find all the days in a month with Date object?
- Convert string to datetime
- Get age from Birthdate [duplicate]
- Issues with Date() when using JSON.stringify() and JSON.parse()
- How can I convert a date value in ISO 8601 format to a date object in JavaScript?
- How can I get the 4 Mondays of a month with js?
- How do I calculate the date in JavaScript three months prior to today?