java-time
(:require '[java-time :as jt])
zoned-date-time
(jt/zoned-date-time "2022-05-26T10:48:10+09:00") ;;=> #object[java.time.ZonedDateTime 0x11446251 "2022-05-26T10:48:10+09:00"]
format
(->> (jt/local-date-time) (jt/format "YYYY-MM-dd"))
timestamp
(defn str->timestamp [datetime] (-> (jt/zoned-date-time datetime) jt/to-millis-from-epoch))
(defn days->seconds [days] (-> (jt/duration days :days) (jt/as :seconds))) (defn now->plus-seconds [seconds] (-> (jt/zoned-date-time) (jt/plus (jt/seconds seconds)) jt/to-millis-from-epoch))
관련 문서
Plugin Backlinks: 아무 것도 없습니다.