In my application I need to compare three dates in one if-else cycle. I have a start date, end date and the date of testing. What I want to check is whether the test date is between the start date and end date.
if (testDate >= startDate && testDate <= endDate) {
If I set the startDate to 25/04/2012 and the endDate to 24/04/2019 and the testDate to 25/12/2013 the code works. But if i set the startDate to 26/04/2000 and the endDate to 24/04/2019 and the testDate to 25/12/2013 the code does not works. What's wrong?