+ 1
Java date: calculate age
How can calculate my age in years,month,weeks,days,hour,second in Java code?
1 Odpowiedź
+ 5
Basically you create two LocalDateTime objects, one for now and one for the birth datetime. You can calculate the period between two LocalDateTimes with ChronoUnit.