Skip to content
Snippets Groups Projects
Commit 4e908be3 authored by Chandrakant Gopalan's avatar Chandrakant Gopalan Committed by Richardson, Mark A
Browse files

Removed unnecessary boolean cast

parent f00326cc
No related branches found
No related tags found
No related merge requests found
......@@ -115,13 +115,13 @@
{:parser (regex->parser #"past([0-9]+)(day|week|month|year)s(~?)", [:int-value :unit :include-current?])
:range (fn [{:keys [unit int-value unit-range to-period include-current?]} dt]
(unit-range (t/minus dt (to-period int-value))
(t/minus dt (to-period (if (boolean (seq include-current?)) 0 1)))))
(t/minus dt (to-period (if (seq include-current?) 0 1)))))
:filter (fn [{:keys [unit int-value include-current?]} field]
["TIME_INTERVAL" field (- int-value) unit {:include-current (boolean (seq include-current?))}])}
{:parser (regex->parser #"next([0-9]+)(day|week|month|year)s(~?)" [:int-value :unit :include-current?])
:range (fn [{:keys [unit int-value unit-range to-period include-current?]} dt]
(unit-range (t/plus dt (to-period (if (boolean (seq include-current?)) 0 1)))
(unit-range (t/plus dt (to-period (if (seq include-current?) 0 1)))
(t/plus dt (to-period int-value))))
:filter (fn [{:keys [unit int-value]} field]
["TIME_INTERVAL" field int-value unit])}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment