fix relative date ranges

This commit is contained in:
byte[] 2019-12-08 11:25:29 -05:00
parent d7dd21c258
commit 3e2dfb3fd9

View file

@ -93,8 +93,8 @@ defmodule Search.DateParser do
defp relative_datetime([count, scale]) do defp relative_datetime([count, scale]) do
now = DateTime.utc_now() now = DateTime.utc_now()
lower = DateTime.add(now, count * -scale, :second) lower = DateTime.add(now, (count + 1) * -scale, :second)
upper = DateTime.add(now, (count - 1) * -scale, :second) upper = DateTime.add(now, count * -scale, :second)
[lower, upper] [lower, upper]
end end