Remove extra date relatives

pull/8387/head
Ben Yorke 2023-01-18 14:22:33 +01:00
parent 07f58f33d6
commit 5e0d0d4bbe
1 changed files with 1 additions and 4 deletions

View File

@ -82,10 +82,7 @@ it will return 1622433600000, which is equivalent to Mon May 31 2021 00 :00:00."
(defmethod resolve-keyword-input :relative-date [db input opts]
(let [relative-to (case (or (namespace input) "today")
"today" (t/today)
"journal" nil
"query" nil
"current" nil)
"today" (t/today))
[_ offset-direction offset offset-unit offset-ms?] (re-find #"^([+-])(\d+)([dwmy])(-ms)?$" (name input))
offset-fn (case offset-direction "+" t/plus "-" t/minus)
offset-amount (parse-long offset)