aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/tau/util.cljs
diff options
context:
space:
mode:
authorMiguel Ángel Moreno <mail@migalmoreno.com>2023-01-17 13:17:40 +0100
committerMiguel Ángel Moreno <mail@migalmoreno.com>2023-01-17 13:17:40 +0100
commit81f03c0b449bec1fa60cf2936bfc3f66a5ad58c1 (patch)
treea2a7aa01f61dd71b511dd3729a9f4b28c35b531f /src/frontend/tau/util.cljs
parent5e995881dd0c431ae63b1a50c2d03e59962241f1 (diff)
chore: Rename project
Diffstat (limited to 'src/frontend/tau/util.cljs')
-rw-r--r--src/frontend/tau/util.cljs24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/frontend/tau/util.cljs b/src/frontend/tau/util.cljs
deleted file mode 100644
index d23ef9a..0000000
--- a/src/frontend/tau/util.cljs
+++ /dev/null
@@ -1,24 +0,0 @@
-(ns tau.util
- (:require
- ["timeago.js" :as timeago]))
-
-(defn format-date
- [date]
- (if (-> date js/Date.parse js/isNaN)
- date
- (timeago/format date)))
-
-(defn format-quantity
- [num]
- (.format
- (js/Intl.NumberFormat
- "en-US" #js {"notation" "compact" "maximumFractionDigits" 1})
- num))
-
-(defn format-duration
- [num]
- (let [duration (js/Date. (* num 1000))
- slice (if (> (.getHours duration) 1)
- #(.slice % 11 19)
- #(.slice % 14 19))]
- (-> duration (.toISOString) slice)))