Blob
1 (ns blog.time2 (:import (java.time.format DateTimeFormatter FormatStyle)3 (java.time LocalDate)4 (java.util Locale)))6 (def pattern7 (DateTimeFormatter/ofPattern "yyyy/MM/dd"))9 (def loc (Locale/forLanguageTag "en"))11 (def pattern-loc12 (DateTimeFormatter/ofPattern "dd MMMM yyy" loc))14 (defn fmt [d]15 (.format d pattern))17 (defn fmt-loc [d]18 (.format d pattern-loc))20 (defn parse [s]21 (LocalDate/parse s pattern))23 (comment24 (parse "2020/03/24")25 (fmt (LocalDate/now))26 (fmt-loc (LocalDate/now))27 )