Comment detail

文字列型日時ののN秒後時間取得 (Nested Flatten)
なんの工夫もないコードです。
1
2
3
4
5
6
7
import Data.Time

addDate time sec = show $ addUTCTime sec $ read time

main = do
    putStrLn $ addDate "2008-09-02 10:20:30 UTC" 15
    putStrLn $ addDate "2008-09-02 10:20:30 UTC" (-5)

Index

Feed

Other

Link

Pathtraq

loading...