The Date
object has the valueOf
method which returns the number of milliseconds since midnight 1970-01-01. You can use it to compare dates. Something like
var date01 = new Date();
var date02 = new Date(2012, 5, 24);
if (date01.valueOf() > date02.valueOf()) {
....
}
More Related Contents:
- `uuuu` versus `yyyy` in `DateTimeFormatter` formatting pattern codes in Java?
- Simplest way to increment a date in PHP?
- Google Apps Script date format issue (Utilities.formatDate)
- Get today date in Google Apps Script
- Display which day it is? sunday or monday “php coding”? [closed]
- How to print a date in a regular format?
- Parsing RFC-3339 / ISO-8601 date-time string in Go
- Adding days to a date in Python
- Convert java.util.Date to what “java.time” type?
- Change system date programmatically
- What is the use of “lenient “?
- In Python, how do you convert seconds since epoch to a `datetime` object?
- Javascript format date / time [duplicate]
- How to select date from datetime column?
- In Java, how do I get the difference in seconds between 2 dates?
- How can I parse dates and convert time zones in Perl?
- Find Month difference in php? [duplicate]
- SQL Query to find the last day of the month
- In Ruby on Rails, what’s the difference between DateTime, Timestamp, Time and Date?
- How to transform currentTimeMillis to a readable date format? [duplicate]
- How to compare dates or date against today with query on google sheets?
- Convert date to datetime in Python
- Date in a URL dd/mm/yyyy
- Time: How to get the next friday?
- Range.Find not making a difference between January and November (February and December) in VBA Excel
- How to Convert Persian (Jalali) Dates to other 18 Calendar Dates in Javascript without External Libraries or Complex Astronomical Equations
- create javascript date UTC
- Get a PHP DateTime difference in days, considering midnight as a day change
- Get date for monday and friday for the current week (PHP)
- Converting Google spreadsheet date into a JS Date object?