Skip to content

Instantly share code, notes, and snippets.

@ruslanbogun
Last active August 8, 2019 13:55
Show Gist options
  • Save ruslanbogun/0cd5b91cc80bd8346273e0be966fa588 to your computer and use it in GitHub Desktop.
Save ruslanbogun/0cd5b91cc80bd8346273e0be966fa588 to your computer and use it in GitHub Desktop.
No implicit Ordering defined for org.joda.time.DateTime
implicit def dateTimeOrdering: Ordering[DateTime] = Ordering.fromLessThan(_ isBefore _)
@otobrglez
Copy link

Use isAfter if you wish to reverse order; like so...

implicit def dateTimeOrdering: Ordering[DateTime] = Ordering.fromLessThan(_ isAfter _)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment