mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 04:27:59 +01:00
fix relative date ranges
This commit is contained in:
parent
d7dd21c258
commit
3e2dfb3fd9
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue