From 8bcb373d07e1c798839b2d4cf7b8a6f2e6401bc6 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 30 Aug 2016 18:28:46 +0300 Subject: [PATCH] Fix wrong impl of datetime/format function. --- src/uxbox/util/datetime.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/uxbox/util/datetime.cljs b/src/uxbox/util/datetime.cljs index bd9e1e9e6..592530e51 100644 --- a/src/uxbox/util/datetime.cljs +++ b/src/uxbox/util/datetime.cljs @@ -72,7 +72,8 @@ " ([v] (format v :iso)) ([v fmt] - (let [vm (js/moment v)] + {:pre [(datetime? v)]} + (let [vm (js/moment (.-v v))] (case fmt :unix (.unix vm) :offset (.valueOf vm)