Skip to content

Commit

Permalink
Remove extra date relatives
Browse files Browse the repository at this point in the history
  • Loading branch information
bendyorke committed Jan 18, 2023
1 parent 07f58f3 commit 5e0d0d4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions deps/graph-parser/src/logseq/graph_parser/util/db.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5e0d0d4

Please sign in to comment.