List of utility methods to do Date to Instant
Instant | asInstant(Date date) Creates an Instant from java.util.Date or it's subclasses. if (date == null) return null; else return Instant.ofEpochMilli(date.getTime()); |
Instant | toInstant(Date date) to Instant if (isInfFuture(date)) { return INF_FUTURE; } else if (isInfPast(date)) { return INF_PAST; } else { return date.toInstant(); |
Instant | toInstant(Date date) Convert to Instance return date == null ? null : date.toInstant();
|
Instant | toInstant(Date date) to Instant if (date == null) { return null; Instant moment = Instant.ofEpochMilli(date.getTime()); return moment; |