aboutsummaryrefslogtreecommitdiff
path: root/common/src/Common
diff options
context:
space:
mode:
authorJoris2018-10-30 18:04:58 +0100
committerJoris2018-10-30 18:04:58 +0100
commit50fb8fa48d1c4881da20b4ecf6d68a772301e713 (patch)
tree99c30c644d40664a9a7bb4a27e838d7cccda7a5f /common/src/Common
parent40b4994797a797b1fa86cafda789a5c488730c6d (diff)
Update table when adding or removing a payment
Diffstat (limited to 'common/src/Common')
-rw-r--r--common/src/Common/Util/Time.hs6
1 files changed, 3 insertions, 3 deletions
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