mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 10:38:13 -05:00
Remove old time ns.
This commit is contained in:
parent
2742a7a4ec
commit
dac425b414
1 changed files with 0 additions and 39 deletions
|
@ -1,39 +0,0 @@
|
|||
(ns uxbox.util.time
|
||||
(:require [cljsjs.moment]))
|
||||
|
||||
(defn parse
|
||||
([v]
|
||||
(js/moment v))
|
||||
([v format]
|
||||
(case format
|
||||
:unix (js/moment.unix v)
|
||||
(js/moment v format))))
|
||||
|
||||
(defn iso
|
||||
[v]
|
||||
(.toISOString v))
|
||||
|
||||
(defn unix
|
||||
[v]
|
||||
(.unix v))
|
||||
|
||||
(defn now
|
||||
([]
|
||||
(js/moment))
|
||||
([format]
|
||||
(case format
|
||||
:unix (unix (now))
|
||||
:iso (iso (now)))))
|
||||
|
||||
(defn ago
|
||||
[time]
|
||||
(.fromNow (parse time)))
|
||||
|
||||
(defn day
|
||||
[time]
|
||||
(.calendar (parse time)
|
||||
nil
|
||||
#js {:sameDay "[Today]"
|
||||
:sameElse "[Today]"
|
||||
:lastDay "[Yesterday]"
|
||||
:lastWeek "[Last] dddd"}))
|
Loading…
Add table
Reference in a new issue