top of page

To get different days between two dates


Here, I am going to use TimeUnit of Java to find the different days of two dates (duration).


REF : TimeUnit


The following are the some points from above reference link.


TimeUnit belongs to the package java.util.concurrent.

TimeUnit has many units like DAYS,MINUTES,SECONDS etc.

TimeUnit is an enum. When we call TimeUnit.DAYS or any other unit, it returns TimeUnit.

TimeUnit has convert method that can convert the given long value in required Time Unit.


Enjoy!

Comentarios


Single post: Blog_Single_Post_Widget
bottom of page