I’ve been working on packages to make it easier to write in my favorite scripting language, Haskell. The first to make it on Hackage is timing-convenience.
Install as usual:
cabal install timing-convenience
Then you can get the time three days ago:
import Data.Time import Data.Time.Convenience main = timeFor 3 Days Ago >>= putStrLn . show
(See why I call it a scripting language? I’d like to see Perl be that obtuse!)
I used this in my script that generates my This Week in Open Source series of blog posts on the thoughtbot blog. I also made use of my github package, which is still under development.
Advertisement