JanetDocsSourcePlaygroundTutorialsI'm Feeling luckyCommunityGitHub sign in
(defn unix->date-label ``Format a unix timestamp as date or datetime string`` [ts] (let [d (os/date ts)] (if (or (pos? (d :hours)) (pos? (d :minutes))) (string/format "%d-%02d-%02d %02d:%02d" (d :year) (d :month) (d :month-day) (d :hours) (d :minutes)) (string/format "%d-%02d-%02d" (d :year) (d :month) (d :month-day)))))