dateParser :: A.Parser Day
dateParser = do
  year <- A.signed A.decimal
  month <- between 1 12 (A.char '-' *> A.decimal)
  day <- between 1 31 (A.char '-' *> A.decimal)
  guard (isJust $ fromGregorianValid (fromIntegral year) month day)
  pure (year, month, day)
dateParser :: A.Parser Day
dateParser = do
  year <- A.signed A.decimal
  month <- between 1 12 (A.char '-' *> A.decimal)
  day <- between 1 31 (A.char '-' *> A.decimal)
  guard (isJust $ fromGregorianValid (fromIntegral year) month day)
  pure (year, month, day)
dateParser = do
  year <- A.signed A.decimal
  month <- between 1 12 (A.char '-' *> A.decimal)
  day <- between 1 31 (A.char '-' *> A.decimal)
  guard (isJust $ fromGregorianValid (fromIntegral year) month day)
  pure (year, month, day)