I suppose my question is simple but I am not finding the solution, How to compare a date with the previous or minor or the next date?
At the moment I have this code:
if(newDate > oldDate || newDate < oldDate){}
And its working but Its nasty, I tried newDate != oldDate
but it doesn´t work for me, What am I doing wrong?