mleaf

  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; } }

 

分类:

技术点:

相关文章:

  • 2021-09-19
  • 2021-07-03
  • 2021-10-10
  • 2022-01-12
  • 2022-01-14
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案