What’s the best way to compare a Java date with Javascript date for greater than or less than comparison?
Java date format: 1985-01-01T00:00:00.000-06:00
Javascript date format: Tue Jan 29 1980 00:00:00 GMT-0600
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you have two date objects, you can compare them directly:
Otherwise, if both dates are ISO8601 dates in the same time zone, you can compare them as strings: