mirror of
https://github.com/logseq/logseq.git
synced 2026-05-01 09:26:28 +00:00
chore: mv logseq.graph-parser.util.db to db dep
This ns is more appropriate in db and was only in graph-parser because the date-time-util lib wasn't accessible to db until #10933 landed. graph-parser dep is specific to file graphs and as much as possible anything unrelated to this should not be in this dep
This commit is contained in:
@@ -12,10 +12,10 @@
|
||||
[frontend.db.utils :as db-utils]
|
||||
[frontend.db.conn :as conn]
|
||||
[datascript.core :as d]
|
||||
[logseq.graph-parser.util.db :as db-util]
|
||||
[logseq.db.frontend.rules :as rules]
|
||||
[frontend.template :as template]
|
||||
[logseq.graph-parser.text :as text]
|
||||
[logseq.common.util.date-time :as date-time-util]
|
||||
[logseq.common.util.page-ref :as page-ref]
|
||||
[logseq.common.util :as common-util]
|
||||
[frontend.util.text :as text-util]
|
||||
@@ -57,13 +57,13 @@
|
||||
(let [input (string/lower-case (name input))]
|
||||
(cond
|
||||
(= "today" input)
|
||||
(db-util/date->int (t/today))
|
||||
(date-time-util/date->int (t/today))
|
||||
|
||||
(= "yesterday" input)
|
||||
(db-util/date->int (t/yesterday))
|
||||
(date-time-util/date->int (t/yesterday))
|
||||
|
||||
(= "tomorrow" input)
|
||||
(db-util/date->int (t/plus (t/today) (t/days 1)))
|
||||
(date-time-util/date->int (t/plus (t/today) (t/days 1)))
|
||||
|
||||
(page-ref/page-ref? input)
|
||||
(let [input (-> (page-ref/get-page-name input)
|
||||
@@ -80,7 +80,7 @@
|
||||
"m" t/months
|
||||
"w" t/weeks
|
||||
t/days)]
|
||||
(db-util/date->int (t/plus (t/today) (tf duration)))))))
|
||||
(date-time-util/date->int (t/plus (t/today) (tf duration)))))))
|
||||
|
||||
(defn- ->timestamp [input]
|
||||
(let [input (string/lower-case (name input))]
|
||||
|
||||
Reference in New Issue
Block a user