Skip to content

Instantly share code, notes, and snippets.

@stephen-lazaro
Created October 4, 2018 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephen-lazaro/0934bec6f6be202a7105c7be4e140cec to your computer and use it in GitHub Desktop.
Save stephen-lazaro/0934bec6f6be202a7105c7be4e140cec to your computer and use it in GitHub Desktop.
// Combine two patterns.
val dateDecoder: RowDecoder[Date] =
  withSlashes <+> withDashes
// It really does work.
val Right(dateA) = dateDecoder("1986/10/10")
val Right(dateB) = dateDecoder("2010–10–10")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment