I want to calculate how many day difference between 2 timestamps, but i do not want to consider the time difference.
For example :
long time1 = 1546258765000 (Mon 31 December 2018 13:19:25)
long time2 = 1546005915367 (Fri 28 December 2018 15:05:15)
The result should be 3, 3 days left for expire... Due to time I get 2 from this method:
TimeUnit.DAYS.convert(time1 - time2 , TimeUnit.MILLISECONDS))
I just need to set the time same for both time1 and time2, and then go back to timestamp and calculate like this... but I am not sure what is the best way to do it.