illegal state exception when using interval 'year'
This commit is contained in:
@@ -56,6 +56,10 @@ public class StartOfInterval implements TemporalAdjuster {
|
||||
result = result.with(ChronoField.DAY_OF_MONTH, 1);
|
||||
break;
|
||||
}
|
||||
case YEARS: {
|
||||
result = result.with(ChronoField.MONTH_OF_YEAR, 1);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw new IllegalArgumentException("Unexpected value: " + unit);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user