
2 Mar
2009
2 Mar
'09
6:22 a.m.
Magicloud Magiclouds
Hi, I am working on some calendar GUI thing. And I cannot find a library to operate the "date". Like, when `now <- getZonedTime`, how could I get all the dates of the week. Or when I got `today`, how to get the date of 10 days ago?
This sort of thing (given now <- getZonedTime): take 10 $ map (addDays (-1)) $ repeat $ utctDay $ zonedTimeToUTC now there's enough functions in that to be going on with, I think. -- Jón Fairbairn Jon.Fairbairn@cl.cam.ac.uk http://www.chaos.org.uk/~jf/Stuff-I-dont-want.html (updated 2009-01-31)