MCPcopy Create free account
hub / github.com/Bit0r/java-util / dateFormat

Method dateFormat

src/main/java/util/ExcelUtils.java:165–173  ·  view source on GitHub ↗

时间格式 @param v 值 @param excelCheck 注解 @param i 行数 @param fieldName excel段名 @param errList 错误信息集合

(Object v, ExcelCheck excelCheck, int i, String fieldName, List<String> errList)

Source from the content-addressed store, hash-verified

163 * @param errList 错误信息集合
164 */
165 private static void dateFormat(Object v, ExcelCheck excelCheck, int i, String fieldName, List<String> errList) {
166 if (ObjectUtil.isEmpty(excelCheck.dateFormat()) || v instanceof Date || ObjectUtil.isNotEmpty(v)) {
167 return;
168 }
169 if (!isDate(v.toString(), excelCheck.dateFormat(), excelCheck.dateFormat().length())) {
170 StringBuilder err = new StringBuilder("第").append(i).append("行,").append(fieldName).append("时间格式不是:").append(excelCheck.dateFormat()).append(";");
171 errList.add(err.toString());
172 }
173 }
174
175 /**
176 * 小数长度

Callers 1

excelCheckObjMethod · 0.95

Calls 1

isDateMethod · 0.95

Tested by

no test coverage detected