aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris2015-10-10 11:28:44 +0200
committerJoris2015-10-10 11:28:44 +0200
commit137d8782797404daade5dddc3b96aedd521ba012 (patch)
tree8fdc65ff498cfbb5c962d4861464e0ed50ab5f29
parent7825b27d262af7252b48e9179a5bbf86b0f30d22 (diff)
Parse months with 3 letters in english
-rw-r--r--src/BirthdateParser.hs24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/BirthdateParser.hs b/src/BirthdateParser.hs
index 1e4051b..9fa7c50 100644
--- a/src/BirthdateParser.hs
+++ b/src/BirthdateParser.hs
@@ -43,15 +43,15 @@ integerParser = (read :: String -> Int) <$> many1 digit
monthParser :: Parser Int
monthParser =
- (try $ string "Janvier" >> return 1)
- <|> (try $ string "Février" >> return 2)
- <|> (try $ string "Mars" >> return 3)
- <|> (try $ string "Avril" >> return 4)
- <|> (try $ string "Mai" >> return 5)
- <|> (try $ string "Juin" >> return 6)
- <|> (try $ string "Juillet" >> return 7)
- <|> (try $ string "Août" >> return 8)
- <|> (try $ string "Septembre" >> return 9)
- <|> (try $ string "Octobre" >> return 10)
- <|> (try $ string "Novembre" >> return 11)
- <|> (try $ string "Décembre" >> return 12)
+ (try $ string "Jan" >> return 1)
+ <|> (try $ string "Feb" >> return 2)
+ <|> (try $ string "Mar" >> return 3)
+ <|> (try $ string "Apr" >> return 4)
+ <|> (try $ string "May" >> return 5)
+ <|> (try $ string "Jun" >> return 6)
+ <|> (try $ string "Jul" >> return 7)
+ <|> (try $ string "Aug" >> return 8)
+ <|> (try $ string "Sep" >> return 9)
+ <|> (try $ string "Oct" >> return 10)
+ <|> (try $ string "Nov" >> return 11)
+ <|> (try $ string "Dec" >> return 12)