mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix test
This commit is contained in:
parent
4f37753b91
commit
6674dcbde7
@ -165,7 +165,7 @@ public enum Month {
|
||||
|
||||
/**
|
||||
* 获得指定月的最后一天
|
||||
* @param month 月份
|
||||
* @param month 月份,从0开始
|
||||
* @param isLeapYear 是否为闰年,闰年只对二月有影响
|
||||
* @return 最后一天,可能为28,29,30,31
|
||||
* @since 5.4.7
|
||||
|
@ -9,11 +9,10 @@ import java.util.List;
|
||||
* 考虑每月的天数不同,且存在闰年情况,日匹配单独使用
|
||||
*
|
||||
* @author Looly
|
||||
*
|
||||
*/
|
||||
public class DayOfMonthValueMatcher extends BoolArrayValueMatcher {
|
||||
|
||||
private static final int[] LAST_DAYS = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
||||
private static final int[] LAST_DAYS = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
|
||||
|
||||
/**
|
||||
* 构造
|
||||
@ -28,7 +27,7 @@ public class DayOfMonthValueMatcher extends BoolArrayValueMatcher {
|
||||
* 给定的日期是否匹配当前匹配器
|
||||
*
|
||||
* @param value 被检查的值,此处为日
|
||||
* @param month 实际的月份
|
||||
* @param month 实际的月份,从1开始
|
||||
* @param isLeapYear 是否闰年
|
||||
* @return 是否匹配
|
||||
*/
|
||||
@ -46,11 +45,11 @@ public class DayOfMonthValueMatcher extends BoolArrayValueMatcher {
|
||||
* </pre>
|
||||
*
|
||||
* @param value 被检查的值
|
||||
* @param month 月份
|
||||
* @param month 月份,从1开始
|
||||
* @param isLeapYear 是否闰年
|
||||
* @return 是否为本月最后一天
|
||||
*/
|
||||
private static boolean isLastDayOfMonth(int value, int month, boolean isLeapYear) {
|
||||
return value == Month.getLastDay(month, isLeapYear);
|
||||
return value == Month.getLastDay(month - 1, isLeapYear);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user