mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-12-07 01:28:34 +08:00
fix:4006修改
This commit is contained in:
parent
29bcdc91cd
commit
47aca4b2b5
@ -35,6 +35,7 @@ public class BoolArrayMatcher implements PartMatcher {
|
|||||||
}
|
}
|
||||||
this.minValue = min;
|
this.minValue = min;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean match(Integer value) {
|
public boolean match(Integer value) {
|
||||||
if (null == value || value >= bValues.length) {
|
if (null == value || value >= bValues.length) {
|
||||||
|
|||||||
@ -50,7 +50,6 @@ public class DayOfMonthMatcher extends BoolArrayMatcher {
|
|||||||
return value == Month.getLastDay(month - 1, isLeapYear);
|
return value == Month.getLastDay(month - 1, isLeapYear);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean isLast() {
|
public boolean isLast() {
|
||||||
return match(31);
|
return match(31);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -193,8 +193,8 @@ public class PatternMatcher {
|
|||||||
if (i == Part.DAY_OF_MONTH.ordinal()
|
if (i == Part.DAY_OF_MONTH.ordinal()
|
||||||
&& matchers[i] instanceof DayOfMonthMatcher
|
&& matchers[i] instanceof DayOfMonthMatcher
|
||||||
&& ((DayOfMonthMatcher) matchers[i]).isLastDay(values[i],values[i+1],isLeapYear(values[Part.YEAR.ordinal()]))) {
|
&& ((DayOfMonthMatcher) matchers[i]).isLastDay(values[i],values[i+1],isLeapYear(values[Part.YEAR.ordinal()]))) {
|
||||||
int newMonth = values[Part.MONTH.ordinal()];
|
int newMonth = newValues[Part.MONTH.ordinal()];
|
||||||
int newYear = values[Part.YEAR.ordinal()];
|
int newYear = newValues[Part.YEAR.ordinal()];
|
||||||
nextValue = getLastDay(newMonth, newYear);
|
nextValue = getLastDay(newMonth, newYear);
|
||||||
} else {
|
} else {
|
||||||
nextValue = matchers[i].nextAfter(values[i]);
|
nextValue = matchers[i].nextAfter(values[i]);
|
||||||
@ -227,8 +227,8 @@ public class PatternMatcher {
|
|||||||
} else if (i == Part.DAY_OF_MONTH.ordinal()
|
} else if (i == Part.DAY_OF_MONTH.ordinal()
|
||||||
&& matchers[i] instanceof DayOfMonthMatcher
|
&& matchers[i] instanceof DayOfMonthMatcher
|
||||||
&& ((DayOfMonthMatcher) matchers[i]).isLastDay(values[i],values[i+1],isLeapYear(values[Part.YEAR.ordinal()]))) {
|
&& ((DayOfMonthMatcher) matchers[i]).isLastDay(values[i],values[i+1],isLeapYear(values[Part.YEAR.ordinal()]))) {
|
||||||
int newMonth = values[Part.MONTH.ordinal()];
|
int newMonth = newValues[Part.MONTH.ordinal()];
|
||||||
int newYear = values[Part.YEAR.ordinal()];
|
int newYear = newValues[Part.YEAR.ordinal()];
|
||||||
nextValue = getLastDay(newMonth, newYear);
|
nextValue = getLastDay(newMonth, newYear);
|
||||||
} else {
|
} else {
|
||||||
nextValue = matchers[i].nextAfter(values[i] + 1);
|
nextValue = matchers[i].nextAfter(values[i] + 1);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user