|
|
@ -47,15 +47,17 @@ public class DateFormatTest { |
|
|
|
List<DateFormatData> list = |
|
|
|
List<DateFormatData> list = |
|
|
|
EasyExcel.read(file, DateFormatData.class, null).locale(Locale.CHINA).sheet().doReadSync(); |
|
|
|
EasyExcel.read(file, DateFormatData.class, null).locale(Locale.CHINA).sheet().doReadSync(); |
|
|
|
for (DateFormatData data : list) { |
|
|
|
for (DateFormatData data : list) { |
|
|
|
if (data.getDateStringCn() != null && !data.getDateStringCn().equals(data.getDate())) { |
|
|
|
if (!Objects.equals(data.getDateStringCn(), data.getDate()) && !Objects.equals(data.getDateStringCn2(), |
|
|
|
log.info("date:cn:{},{}", data.getDateStringCn(), data.getDate()); |
|
|
|
data.getDate())) { |
|
|
|
|
|
|
|
log.info("date:cn:{},{},{}", data.getDateStringCn(), data.getDateStringCn2(), data.getDate()); |
|
|
|
} |
|
|
|
} |
|
|
|
if (data.getNumberStringCn() != null && !data.getNumberStringCn().equals(data.getNumber())) { |
|
|
|
if (data.getNumberStringCn() != null && !data.getNumberStringCn().equals(data.getNumber())) { |
|
|
|
log.info("number:cn{},{}", data.getNumberStringCn(), data.getNumber()); |
|
|
|
log.info("number:cn{},{}", data.getNumberStringCn(), data.getNumber()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
for (DateFormatData data : list) { |
|
|
|
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月
|
|
|
|
// For example, on Linux: 1-Jan -> 1-1月
|
|
|
|
// On Mac: 1-Jan -> 1-一月
|
|
|
|
// On Mac: 1-Jan -> 1-一月
|
|
|
|
Assertions.assertTrue( |
|
|
|
Assertions.assertTrue( |
|
|
|