nearestValue = months.getNextValue(date.getMonthOfYear(), 0);
</BUG>
int nextMonths = nearestValue.getValue();
if(nearestValue.getShifts()>0){
newDate =
<BUG>new DateTime(date.getYear(), 1, 1, 0, 0, 0, date.getZone()).plusYears(nearestValue.getShifts());
</BUG>
return nextClosestMatch(newDate);
}
<BUG>if (nearestValue.getValue() < date.getMonthOfYear()) {
</BUG>
date = date.plusYears(1);

int newYear = yearsValueGenerator.generateNextValue(date.getYear());
days = generateDays(cronDefinition, ZonedDateTime.of(LocalDateTime.of(newYear, lowestMonth, 1, 0, 0), date.getZone()));
return initDateTime(yearsValueGenerator.generateNextValue(date.getYear()), lowestMonth, days.getValues().get(0), lowestHour, lowestMinute, lowestSecond, date.getZone());
}
if(!months.getValues().contains(date.getMonthValue())) {
nearestValue = months.getNextValue(date.getMonthValue(), 0);
int nextMonths = nearestValue.getValue();
if(nearestValue.getShifts()>0){
newDate =
ZonedDateTime.of(LocalDateTime.of(date.getYear(), 1, 1, 0, 0, 0), date.getZone()).plusYears(nearestValue.getShifts());
return nextClosestMatch(newDate);
