--ghc mtime1 = now >>= (\d -> putStrLn (calendarTimeToString d)) --ghc mtime2 = do d <- now --ghc putStrLn ("Today is day "^d.ctYDay^" of the current year") --ghc putStrLn ("Today is day "^d.ctDay^ " of the current month") --ghc --ghc |
--ghc (day,month,year) = (now >>> ctDay, now >>> ctMonth, now >>> ctYear) --ghc tl = now >>= localtime --ghc --ghc mtime3 = do date <- tl --ghc putStrLn ("The current date is "^date.ctYear^" "^date.ctMonth^" "^date.ctDay) --ghc --ghc mtime4 = do d <- now --ghc putStrLn (strftime "%Y-%m-%d" d) --ghc --ghc -- TODO 3.2, 3.3 --ghc |
--ghc add_sec sec d = d.toClockTime.addToClockTime (nulltime {tdSec= sec}) --ghc when_ = now >>> (\d -> d.add_sec 100) --ghc then_ = now >>> (\d -> d.add_sec (-100)) --ghc |
--ghc (monthday, weekday, yearday) = (now >>> ctDay, now >>> ctWDay, now >>> ctYDay) --ghc --ghc weeknum = now >>> (\d -> d.strftime "%U".read + 1) --ghc --ghc -- TODO 3.9 --ghc usec = now >>> ctPicosec -- is this ? --ghc --ghc -- TODO _3.10 --ghc -- have sleep::Int but not Double :( ---------------------------------------------------------------------------------------------------- |