From c52385f05b2ffa7acaf6846fa550c9b4935e9f09 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Tue, 18 Jun 2024 17:51:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E6=9C=9F=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=E6=A1=88=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/core/dataformat/DateFormatTest.java | 8 +++++--- .../test/resources/dataformat/dataformat.xls | Bin 28672 -> 29184 bytes .../test/resources/dataformat/dataformat.xlsx | Bin 12615 -> 12655 bytes 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/core/dataformat/DateFormatTest.java b/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/core/dataformat/DateFormatTest.java index 655239f8..1229b238 100644 --- a/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/core/dataformat/DateFormatTest.java +++ b/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/core/dataformat/DateFormatTest.java @@ -47,15 +47,17 @@ public class DateFormatTest { List list = EasyExcel.read(file, DateFormatData.class, null).locale(Locale.CHINA).sheet().doReadSync(); for (DateFormatData data : list) { - if (data.getDateStringCn() != null && !data.getDateStringCn().equals(data.getDate())) { - log.info("date:cn:{},{}", data.getDateStringCn(), data.getDate()); + if (!Objects.equals(data.getDateStringCn(), data.getDate()) && !Objects.equals(data.getDateStringCn2(), + data.getDate())) { + log.info("date:cn:{},{},{}", data.getDateStringCn(), data.getDateStringCn2(), data.getDate()); } if (data.getNumberStringCn() != null && !data.getNumberStringCn().equals(data.getNumber())) { log.info("number:cn{},{}", data.getNumberStringCn(), data.getNumber()); } } for (DateFormatData data : list) { - // The way dates are read in Chinese is different on Linux and Mac, so it is acceptable if it matches either one. + // The way dates are read in Chinese is different on Linux and Mac, so it is acceptable if it matches + // either one. // For example, on Linux: 1-Jan -> 1-1月 // On Mac: 1-Jan -> 1-δΈ€ζœˆ Assertions.assertTrue( diff --git a/easyexcel-test/src/test/resources/dataformat/dataformat.xls b/easyexcel-test/src/test/resources/dataformat/dataformat.xls index ec0c39ba4bf089807e3ec96247e79d7c6aec10fb..95c306ce007778b92874296492c635f3afded0b0 100644 GIT binary patch delta 505 zcmY*VODsb{6g@M2?R%|OltvK2LTp5|eii=+LgFuxppno#)kb`RUB$By7BL_u%HdH`Ca0#)$SKyKI(G=)~EU@U2td9u=KP=1LN8ld5zIsF5*1z07`Ea5HT zHDLn-@>_u|!hJ$J2e#XQXTq?SOWS%x7WVD99bE%7{5LXv;56u6B9KDm&f5VrgpmkKc5y$dX6x3m)ZntiCw)t!@Lfb_1WTHALWk| o@-uS8MAl3xOURFijmyRP5ZjA&YVU7Mzr15MaTu+ZM$E8(0hg0+q5uE@ delta 354 zcmZp8!r1VDaRUnzuPFlq!@vLk|FZyTlgWZiyLmx8GpOjlje+WnlUQZ3hX_Lr2T&axWHMZszvM_OoYTU}a)pu-`nzcODPh9zO<#q{z*;(xe$T2S+<{OkR|%!O6(P z#vs7J#1K9Cda^#4CkW;Vr$Bf@Al_#Gl--PsdXu@+l-czdEI@FwX_^xsFHn+!fe{FS vET+l68NrM$n{TEaXJq8ryfA~AX;O|W$AQPZu?KH4GEa8QGTz*f)4&Py_ zO$&4n45HRQa;MMV-F@ero~?`Ad*s>(B@;xB0_1VYR4U{$LD#=7{66xGr81?tk~~2h zZqV7_>zC7&(hqZ`9y|b$CPA6CWsI?5884_gQYDvQStwml3tPR!rqrCKCga?H7C8=s zAi@O|5;X|1eh-FPECl1{id6-dwgJ&Rrxxg&Oq8ZYE7*JB3aTHf(r2nD0b(w4VK+4> z@(LDDmr`ju&mrtJ>3M4nzX<*$fFW#80@J}!gfD*P~_mgBGq* zIr4I9>?9SIrwKZSty=N@iyrcHRgNl=gO!jV>?1tb$$6$>1GOLKmTO5ZA1i4=YFp}` zl~s*B&J>8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