public class DateValidation { final int CONST_YEAR_RANGE = 5; final Calendar searchBeginDate = input.getBeginDate(); final Calendar searchEndDate = input.getEndDate(); final int endYrDos = searchEndDate.get(Calendar.YEAR); final int startYrDos = searchBeginDate.get(Calendar.YEAR); if (endYrDos - startYrDos > CONST_YEAR_RANGE) { System.out.println("DATE_RANGE_EXCEEDED must be less than 5 years", + endYrDos, startYrDos); }
Java DateDiff
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)