Answers for "java current date + number days"

2

java number of days between dates

LocalDate start = LocalDate.parse("2020-11-03");
LocalDate end = LocalDate.parse("2020-12-15");

long diff = DAYS.between(start, end);
Posted by: Guest on February-12-2021
-1

java 8 seconds to days

int day = (int)TimeUnit.SECONDS.toDays(seconds);        
 long hours = TimeUnit.SECONDS.toHours(seconds) - (day *24);
 long minute = TimeUnit.SECONDS.toMinutes(seconds) - (TimeUnit.SECONDS.toHours(seconds)* 60);
 long second = TimeUnit.SECONDS.toSeconds(seconds) - (TimeUnit.SECONDS.toMinutes(seconds) *60);
Posted by: Guest on April-03-2020

Code answers related to "java current date + number days"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language