could everyone help me with if statement below so that it will be true when the date in the GregorianCalendar instance myGC1 is not later than the date of the GregorianCalendar instance myGC2:
if ( ) {
...
}
Use the inherited Calendar method after
if(!myGC1.after(myGC2)){
// do stuff
}
Also, according to the API, this method is equivalent to compareTo
if(!(myGC1.compareTo(myGC2) > 0)){
// do stuff
}
if ( !(myGC1.compareTo(myGC2)>0) )
{
...
}
Using the compareTo method will allow you to check for equality as well as >,<.