/** * Checks whether the holiday is within the valid date range. * * @param h the holiday to check for validity * @param year the year to check the holiday to be valid in * @return the holiday is valid */ private <T extends Holiday> boolean isValidInYear(T h, int year) { return (h.getValidFrom() == null || h.getValidFrom() <= year) && (h.getValidTo() == null || h.getValidTo() >= year); }
return year % 2 == 0; } else { if (h.getValidFrom() != null) { int cycleYears; if (TWO_YEARS.equalsIgnoreCase(h.getEvery())) { + "'."); return (year - h.getValidFrom()) % cycleYears == 0;