文档库--导入

This commit is contained in:
zhn
2022-03-07 23:03:57 +08:00
parent 435e4565f4
commit 1936890016
8 changed files with 771 additions and 260 deletions
@@ -0,0 +1,37 @@
package com.jero.common.constant.enums;
/**
* 中英文切换标识
* @description
* @date 2022/1/21 15:22
* @auth zhn
*/
public enum IsMustEnum {
YES("是","0"),
NO("否","1");
String name;
String value;
private IsMustEnum(String name, String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
@@ -646,5 +646,26 @@ public class DateUtils extends PropertyEditorSupport {
calendar.setTime(getDate());
return calendar.get(Calendar.YEAR);
}
/***
* @Description: 判断多个日期是否都符合日期格式
* @Author: yangxuenan
* @Date: 2020/12/31 11:31
* @Param: [str]
* @Return: boolean
*/
public static boolean isValidDate(String str){
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String[] strArr = str.split(",");
for (String dateStr : strArr) {
String replace = dateStr.replace("/", "-");
try {
simpleDateFormat.setLenient(false);
simpleDateFormat.parse(replace);
} catch (Exception e){
return false;
}
}
return true;
}
}
}