I've been working with Haskell's Date.Time modules to parse a date like 12-4-1999
or 1-31-1999
. I tried:
parseDay :: String -> Day
parseDay s = readTime defaultTimeLocale "%m%d%Y" s
And I think it wants my months and days to have exactly two digits instead of 1 or 2...
What's the proper way to do this?
Also, I'd like to print out my Day in this format: 12/4/1999
what's the Haskell way to?
Thanks for the help.
Alex