Java tutorial
import java.time.YearMonth; import java.time.temporal.ChronoField; import java.time.temporal.ValueRange; public class Main { public static void main(String[] args) { YearMonth y = YearMonth.now(); ValueRange m = y.range(ChronoField.YEAR); System.out.println(m); } }