public class DayOfMonthMatcher extends BoolArrayMatcher
bValues| Constructor and Description |
|---|
DayOfMonthMatcher(List<Integer> intValueList)
构造
|
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxValue(int month,
boolean isLeapYear)
获取表达式定义中指定月的最大日的值
首先获取表达式定义的最大值,如果这个值大于本月最后一天,则返回最后一天,否则返回用户定义的最大值 注意最后一天可能不是表达式中定义的有效值 |
int |
getMinValue(int month,
boolean isLeapYear)
获取表达式定义中指定月的最小日的值
|
boolean |
isLast()
是否包含最后一天
|
boolean |
isLastDay(Integer value,
Integer month,
boolean isLeapYear)
检查value是这个月的最后一天
|
boolean |
match(int dayValue,
int month,
boolean isLeapYear)
给定的日期是否匹配当前匹配器
|
int |
nextAfter(int dayValue,
int month,
boolean isLeapYear)
获取指定日之后的匹配值,也可以是其本身
如果表达式中存在最后一天(如使用"L"),则: 4月、6月、9月、11月最多匹配到30日 4月闰年匹配到29日,非闰年28日 |
getMaxValue, getMinValue, match, nextAfter, toStringpublic boolean match(int dayValue,
int month,
boolean isLeapYear)
dayValue - 被检查的值,此处为日month - 实际的月份,从1开始isLeapYear - 是否闰年public int nextAfter(int dayValue,
int month,
boolean isLeapYear)
dayValue - 指定的天值month - 月份,从1开始isLeapYear - 是否为闰年public boolean isLast()
public boolean isLastDay(Integer value, Integer month, boolean isLeapYear)
value - 被检查的值month - 月份,从1开始isLeapYear - 是否闰年public int getMinValue(int month,
boolean isLeapYear)
month - 月,base1isLeapYear - 是否闰年public int getMaxValue(int month,
boolean isLeapYear)
month - 月,base1isLeapYear - 是否闰年Copyright © 2025. All rights reserved.