Skip to content

Instantly share code, notes, and snippets.

@urcadox
Created December 16, 2014 17:06
Show Gist options
  • Save urcadox/fe010243520e79c9a25b to your computer and use it in GitHub Desktop.
Save urcadox/fe010243520e79c9a25b to your computer and use it in GitHub Desktop.
import org.joda.time.format.ISODateTimeFormat
implicit val dateTimeBinder = new QueryStringBindable.Parsing[DateTime](
ISODateTimeFormat.dateTime.parseDateTime _,
ISODateTimeFormat.dateTime.print _,
(key: String, e: Exception) => s"Cannot parse parameter $key as DateTime: ${e.getMessage}"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment