compare the date with current date and take offset. Whichever offset is highest is your output. You can google the java code for this.
compare the date with current date and take offset. Whichever offset is highest is your output. You can google the java code for this.