From fb0f0e9b3c59cecd6ff08be722cfbf0a1b968ba2 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sun, 29 Dec 2019 13:37:12 -0800 Subject: hledger-overview: getCurrentTime --- hledger-overview.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'hledger-overview.hs') diff --git a/hledger-overview.hs b/hledger-overview.hs index 6a8a722..d21d285 100755 --- a/hledger-overview.hs +++ b/hledger-overview.hs @@ -3,12 +3,13 @@ module Main where import Hledger import Data.Either (fromRight) -import Data.Time.Calendar (Day, fromGregorian) +import Data.Time.Calendar (Day) +import Data.Time.Clock (UTCTime(utctDay), getCurrentTime) import Data.Text (pack) main = do j <- getJournal - let today = fromGregorian 2019 12 17 + today <- getCurrentTime >>= return . utctDay let bal = getTotal j today say ["simple", show $ bal "^as:me:cash:simple status:! status:*"] say ["wallet", show $ bal "^as:me:cash:wallet"] -- cgit v1.2.3