From 73835fc55299eb227c94f1594b0bd97f790b1408 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Fri, 15 Dec 2023 13:06:26 +0900 Subject: [PATCH] =?UTF-8?q?str2datetime=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cokr/xit/base/file/xls/XLS.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/main/java/cokr/xit/base/file/xls/XLS.java b/src/main/java/cokr/xit/base/file/xls/XLS.java index f65ae62..a11a80b 100644 --- a/src/main/java/cokr/xit/base/file/xls/XLS.java +++ b/src/main/java/cokr/xit/base/file/xls/XLS.java @@ -4,8 +4,6 @@ import java.io.InputStream; import java.io.OutputStream; import java.text.SimpleDateFormat; import java.util.Date; -import java.util.Map; -import java.util.function.Function; import org.springframework.core.io.ClassPathResource; @@ -114,14 +112,14 @@ public abstract class XLS extends AbstractComponent { int length = str.length(), pos = length - 6; - String - date = str.substring(0, pos), - time = str.substring(pos); - - return str2date(date) + " " + str2time(time); - } + try { + String + date = str.substring(0, pos), + time = str.substring(pos); - public final Function, Object> wrap(Function, Object> func) { - return func; + return str2date(date) + " " + str2time(time); + } catch (Exception e) { + return str; + } } } \ No newline at end of file