Java LocalDate Between isBetween13And18YearsBetween(LocalDate birthLocalDate, LocalDate now)

Here you can find the source of isBetween13And18YearsBetween(LocalDate birthLocalDate, LocalDate now)

Description

is Between And Years Between

License

LGPL

Declaration

static boolean isBetween13And18YearsBetween(LocalDate birthLocalDate, LocalDate now) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.time.LocalDate;
import java.time.Period;

public class Main {
    static boolean isBetween13And18YearsBetween(LocalDate birthLocalDate, LocalDate now) {
        int years = Period.between(birthLocalDate, now).getYears();

        return years >= 13 && years < 18;
    }//from  w  w w .  j ava2  s  .  com
}

Related

  1. daysBetween(LocalDate date1, LocalDate date2)
  2. daysBetween(LocalDate firstDate, LocalDate secondDate)
  3. getLocalDatesBetween(final LocalDate localDate1, final LocalDate localDate2)
  4. getRandomLocalDateBetween(int startYear, int endYear)
  5. isBetween(LocalDate date, LocalDate before, LocalDate after)
  6. isBetweenDates(LocalDate date, LocalDate start, LocalDate end)
  7. isBetweenIncl(@Nullable final LocalDate aDate, @Nullable final LocalDate aLowerBound, @Nullable final LocalDate aUpperBound)