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

 

分类:

技术点:

相关文章:

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