I am getting some strange results from Joda Time and I am not sure what is causing it.
I am comparing two datetimes (alarm end and stop time) to ensure the user doesn't set an alarm to end before it starts.
I used the is .isAfter() but it seem to be giving me an incorrect result.
This is the if statement:
if (MainActivity.alarmStartDateTime.isAfter(MainActivity.alarmEndDateTime)) {
nextReminderTextView1.setText("WARNING THE ALARM END DATE & TIME IS BEFORE THE ALARM DATE & TIME");
alarmSetToEndBeforeItStarts = true;
}
This was the start and end datetimes:
MainActivity.alarmStartDateTime = 2016-11-21T00:26:45.183+10:00
MainActivity.alarmEndDateTime = 2016-11-21T00:30:00.000+10:00
And this was the result:
alarmSetToEndBeforeItStarts = true
Thanks in advance for you help