Here you can find the source of withinAYearFromNow(LocalDate date)
static boolean withinAYearFromNow(LocalDate date)
//package com.java2s; //License from project: Open Source License import java.time.*; public class Main { static boolean withinAYearFromNow(LocalDate date) { LocalDate withinAYear = LocalDate.of(LocalDate.now().getYear() + 1, LocalDate.now().getMonth(), LocalDate.now().getDayOfMonth()); return (date.isBefore(withinAYear) && date.isAfter(LocalDate.now())) || date.isEqual(LocalDate.now()); }//w w w . ja va2 s . c om }