get Age Days from Java LocalDate - Java java.util

Java examples for java.util:Day

Description

get Age Days from Java LocalDate

Demo Code


//package com.java2s;
import java.time.LocalDate;

import java.time.temporal.ChronoUnit;

public class Main {
    public static long getAgeDays(LocalDate date) {
        return ChronoUnit.DAYS.between(date, LocalDate.now());
    }/*from  ww  w  .  j a v a  2 s . c  o m*/
}

Related Tutorials