1 Finding today's date
import Data.Time
c < getCurrentTime > 20090421 14:25:29.5585588 UTC
(y,m,d) = toGregorian $ utctDay c > (2009,4,21)
2 Adding to or subtracting from a date
Problem

Solution

Examples

adding days to a date

addDays

import Date.Time
a = fromGregorian 2009 12 31 > 20091231
b = addDays 1 a > 20100101

subtracting days from a date

addDays

import Date.Time
a = fromGregorian 2009 12 31 > 20091231
b = addDays (7) a > 20091224

3 Difference of two dates
Problem

Solution

Examples

calculating the difference of two dates

diffDays

import Date.Time
a = fromGregorian 2009 12 31 > 20091231
b = fromGregorian 2010 12 32 > 20101231
diffDays b a > 365

4 CPU time
Use System.CPUTime.getCPUTime to get the CPU time in picoseconds.
You can time a computation like this
getCPUTimeDouble :: IO Double
getCPUTimeDouble = do t < System.CPUTime.getCPUTime; return ((fromInteger t) * 1e12)
main = do
t1 < getCPUTimeDouble
print (fib 30)
t2 < getCPUTimeDouble
print (t2t1)