mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
chore: dry up usage of same fn across 3 namespaces
This commit is contained in:
@@ -150,8 +150,8 @@
|
||||
repetition (if repetition
|
||||
(str " " (repetition-to-string repetition))
|
||||
"")
|
||||
hour (when hour (cli-common-util/zero-pad hour))
|
||||
min (when min (cli-common-util/zero-pad min))
|
||||
hour (when hour (common-util/zero-pad hour))
|
||||
min (when min (common-util/zero-pad min))
|
||||
time (cond
|
||||
(and hour min)
|
||||
(common-util/format " %s:%s" hour min)
|
||||
@@ -162,8 +162,8 @@
|
||||
(common-util/format "%s%s-%s-%s %s%s%s%s"
|
||||
open
|
||||
(str year)
|
||||
(cli-common-util/zero-pad month)
|
||||
(cli-common-util/zero-pad day)
|
||||
(common-util/zero-pad month)
|
||||
(common-util/zero-pad day)
|
||||
wday
|
||||
time
|
||||
repetition
|
||||
|
||||
6
deps/cli/src/logseq/cli/common/util.cljc
vendored
6
deps/cli/src/logseq/cli/common/util.cljc
vendored
@@ -18,12 +18,6 @@
|
||||
content)))
|
||||
zip)))
|
||||
|
||||
(defn zero-pad
|
||||
[n]
|
||||
(if (< n 10)
|
||||
(str "0" n)
|
||||
(str n)))
|
||||
|
||||
;; Macros are defined at top-level for frontend and nbb
|
||||
|
||||
(defmacro concatv
|
||||
|
||||
1
deps/common/src/logseq/common/util.cljs
vendored
1
deps/common/src/logseq/common/util.cljs
vendored
@@ -113,7 +113,6 @@
|
||||
(js->clj :keywordize-keys true)))
|
||||
|
||||
(defn zero-pad
|
||||
"Copy of frontend.util/zero-pad. Too basic to couple to main app"
|
||||
[n]
|
||||
(if (< n 10)
|
||||
(str "0" n)
|
||||
|
||||
Reference in New Issue
Block a user