diff options
author | Joris | 2019-10-14 09:10:33 +0200 |
---|---|---|
committer | Joris | 2019-10-14 09:11:20 +0200 |
commit | 284214d3af39143fdbeca57ffa4864389e7d517a (patch) | |
tree | b514a4a293e836dffa1572f7d16378dd0bbcdb71 /client/src/Util | |
parent | 04c59f08f100ba6a0658d1f2b357f7d8b1e14218 (diff) |
Show cumulative incomes per user in income page
Diffstat (limited to 'client/src/Util')
-rw-r--r-- | client/src/Util/Date.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/client/src/Util/Date.hs b/client/src/Util/Date.hs new file mode 100644 index 0000000..8fad881 --- /dev/null +++ b/client/src/Util/Date.hs @@ -0,0 +1,12 @@ +module Util.Date + ( utcToLocalDay + ) where + +import Data.Time.Calendar (Day) +import Data.Time.Clock (UTCTime) +import qualified Data.Time.LocalTime as LocalTime + +utcToLocalDay :: UTCTime -> IO Day +utcToLocalDay time = do + timezone <- LocalTime.getCurrentTimeZone + return . LocalTime.localDay $ LocalTime.utcToLocalTime timezone time |