date用時間差計算歷史日期時間 - Linux

Table of Contents


我知道可以算當前時間的前後

例如
date -d '1 day'
date -d '1 day ago'

或是給出歷史時間

date -d '19900101'

那能不能算
19900101 的90天後 或是90天前?


文章打到一半突然被我試出來怎麼算了

改成跟大家分享 XD

date -d ' 19900101 90 day '
date -d '19900101 90 day ago'

--

All Comments