Clojure将时间戳解析为字符串

Clojure将时间戳解析为字符串,clojure,clj-time,Clojure,Clj Time,我正在尝试将clojure时间戳转换为特定格式。我正在使用clj时间库。以下是我正在做的: (f/unparse :year-month-day (t/date-time 2010 10 3)) 它看起来很像文档示例,但我不明白为什么会出现这样的ClassCastException: ClassCastException clojure.lang.Keyword cannot be cast to org.joda.time.format.DateTimeFormatter clj-tim

我正在尝试将clojure时间戳转换为特定格式。我正在使用clj时间库。以下是我正在做的:

(f/unparse :year-month-day  (t/date-time 2010 10 3))
它看起来很像文档示例,但我不明白为什么会出现这样的ClassCastException:

ClassCastException clojure.lang.Keyword cannot be cast to org.joda.time.format.DateTimeFormatter  clj-time.format/unparse (format.clj:185)
感谢您的帮助。

定义解析器:

 (def custom-formatter (fmt/formatter "yyyy-MM-dd"))
然后使用它:

(fmt/unparse custom-formatter (time/date-time 2010 10 3))