尋找今天的日期

使用 getCurrentTime 可以找到當前日期和時間:

import Data.Time

print =<< getCurrentTime
-- 2016-08-02 12:05:08.937169 UTC

或者,fromGregorian 只返回日期:

fromGregorian 1984 11 17  -- yields a Day