if (date1.getTime() > date2.getTime()) {
alert("The first date is after the second date!");
}
More Related Contents:
- How do you get a timestamp in JavaScript?
- Incrementing a date in JavaScript
- Check time difference in Javascript
- How to add hours to a Date object?
- Browsers, time zones, Chrome 67 Error (historic timezone changes)
- Javascript – get array of dates between 2 dates
- Converting milliseconds to a date (jQuery/JavaScript)
- How to parse JSON to receive a Date object in JavaScript?
- How to get the difference of two dates in mm-dd-hh format in Javascript
- exclude weekends in javascript date calculation
- Regular Expression | Leap Years and More
- Javascript timestamp to relative time
- Converting 24 hour time to 12 hour time w/ AM & PM using Javascript
- How do I specify the time zone when creating a JavaScript Date?
- How to use timezone offset in Nodejs?
- Get next date from weekday in JavaScript
- Regex and ISO8601 formatted DateTime [duplicate]
- Javascript: output current datetime in YYYY/mm/dd hh:m:sec format
- Stop javascript Date function from changing timezone offset
- Age from Date of Birth using JQuery
- How to change date format in JavaScript [duplicate]
- Problem with date formats in JavaScript with different browsers
- Use JavaScript to convert a date string with timezone to a date object in local time
- Work with a time span in Javascript
- How to Convert Persian (Jalali) Dates to other 18 Calendar Dates in Javascript without External Libraries or Complex Astronomical Equations
- Calculate the UTC offset given a TimeZone string in JavaScript
- JS check for valid date format
- Javascript, Time and Date: Getting the current minute, hour, day, week, month, year of a given millisecond time
- Hot to get incomplete datetime-local input values
- Converting Google spreadsheet date into a JS Date object?