update
This commit is contained in:
@@ -437,6 +437,12 @@ public class DateUtils extends PropertyEditorSupport {
|
||||
}
|
||||
|
||||
public static String formatDate(String dateStr, String pattern) {
|
||||
if (StringUtils.hasText(dateStr)) {
|
||||
return "";
|
||||
}
|
||||
if (StringUtils.hasText(pattern)) {
|
||||
return dateStr;
|
||||
}
|
||||
try {
|
||||
Date date = parseDate(dateStr, "yyyy-MM-dd HH:mm");
|
||||
return getSdFormat(pattern).format(date);
|
||||
|
||||
Reference in New Issue
Block a user