git.iko.soy/typeable/bloodhound
on master help sign in
Format date as dd-MM-yyyy to support stricter 2.0+
commit9b9604b8b71316bf8633ea08ec51b9c4985219ca authorAlistair Bush <alistair.bush@gmail.com> dateTue 30 Aug 2016, 21:01 (10 years ago) parent0415794
1 file changed+1−4
src/Database/Bloodhound/Types.hs+1−4
src/Database/Bloodhound/Types.hs+1−4
@@ -1917,10 +1917,7 @@ instance ToJSON DateRangeAggRange where
19171917instance ToJSON DateMathExpr where
19181918 toJSON (DateMathExpr a mods) = String (fmtA a <> mconcat (fmtMod <$> mods))
19191919 where fmtA DMNow = "now"
1920− fmtA (DMDate date) = case toGregorian date of
1921− (y,m,d) -> showText y <> "-" <>
1922− showText m <> "-" <>
1923− showText d <> "||"
1920+ fmtA (DMDate date) = (T.pack $ showGregorian date) <> "||"
19241921 fmtMod (AddTime n u) = "+" <> showText n <> fmtU u
19251922 fmtMod (SubtractTime n u) = "-" <> showText n <> fmtU u
19261923 fmtMod (RoundDownTo u) = "/" <> fmtU u