aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/common.cabal2
-rw-r--r--common/src/Common/Util/Time.hs6
2 files changed, 4 insertions, 4 deletions
diff --git a/common/common.cabal b/common/common.cabal
index 151326a..78f2927 100644
--- a/common/common.cabal
+++ b/common/common.cabal
@@ -29,6 +29,7 @@ Library
Common.Model
Common.Model.CreatePayment
Common.Model.Payment
+ Common.Model.User
Common.Msg
Common.Util.Text
Common.Util.Time
@@ -52,4 +53,3 @@ Library
Common.Model.Payer
Common.Model.PaymentCategory
Common.Model.SignIn
- Common.Model.User
diff --git a/common/src/Common/Util/Time.hs b/common/src/Common/Util/Time.hs
index 9ab7ab5..6240720 100644
--- a/common/src/Common/Util/Time.hs
+++ b/common/src/Common/Util/Time.hs
@@ -16,9 +16,9 @@ timeToDay time = localDay . (flip utcToLocalTime time) <$> getTimeZone time
parseDay :: Text -> Maybe Day
parseDay str = do
- (d, m, y) <-
- case T.splitOn str "/" of
- [d, m, y] -> Just (d, m, y)
+ (y, m, d) <-
+ case T.splitOn "-" str of
+ [y, m, d] -> Just (y, m, d)
_ -> Nothing
d' <- T.readMaybe . T.unpack $ d
m' <- T.readMaybe . T.unpack $ m