|
@@ -96,7 +96,16 @@ public class JPDispatchPlanInfoSave {
|
|
|
}
|
|
|
//TODO 判断是否为1=31的数字
|
|
|
public static boolean isOneToThirtyOne(String str) {
|
|
|
- return str.matches("[1-31]+");
|
|
|
+ try {
|
|
|
+ int number = Integer.parseInt(str);
|
|
|
+ if (number >= 1 && number <= 31) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ } catch (NumberFormatException e) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
//TODO 判断是否为mm-dd格式
|
|
|
public static boolean isMonthDay(String str) {
|