christian-marie / time-qq

Haskell QuasiQuoting for times.
BSD 3-Clause "New" or "Revised" License
3 stars 3 forks source link

Parse timezones #1

Closed dbaynard closed 7 years ago

dbaynard commented 7 years ago

Hello,

It would be helpful to parse to TimeZone rather than just to UTCTime.

If you're interested, I'll send a PR. But as the library is quite small, I figure you may wish to specify the interface.

I'm thinking, a function (similar to utcFormat) timeZoneFormat :: String -> QuasiQuoter and a function

timeZone :: QuasiQuoter
timeZone = utcFormat "%Z"

Tests might involve, say

show [timeZone| BST |] `shouldBe` "BST"