标签:als col 方式 exce pre equal datetime isa try
static ZoneId ZONEID_BJ = ZoneId.of("GMT+08:00");
private boolean sameDate(Date d1, Date d2){ try { return ZonedDateTime.ofInstant(d1.toInstant(), ZONEID_BJ).toLocalDate().isEqual( ZonedDateTime.ofInstant( d2.toInstant(), ZONEID_BJ) .toLocalDate()); } catch (Exception e) { return false; } } private boolean compareDate(Date d1, Date d2){ try { return ZonedDateTime.ofInstant(d1.toInstant(), ZONEID_BJ).toLocalDate().isAfter( ZonedDateTime.ofInstant( d2.toInstant(), ZONEID_BJ) .toLocalDate()); } catch (Exception e) { return false; } }
标签:als col 方式 exce pre equal datetime isa try
原文地址:https://www.cnblogs.com/mleaf/p/9990638.html