I want to use java.time.LocalDate and java.time.LocalDateTime with an implicit Ordered like:
java.time.LocalDate
java.time.LocalDateTime
Ordered
val date1 = java.time.Loc
You can use Ordering.by to create ordering for any type, given a function from that type to something that already has an Ordering - in this case, to Long:
Ordering.by
Long
implicit val localDateOrdering: Ordering[LocalDate] = Ordering.by(_.toEpochDay)