Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (ns clj-current-time.core
- (:require [clj-time.core :as t]
- [clj-time.local :as l]))
- (defn greet
- ([]
- (greet (l/local-now)))
- ([dt]
- (let [h (t/hour dt)]
- (cond
- (<= 5 h 11) "おはようございます"
- (<= 12 h 17) "こんにちは"
- :else "こんばんは") )))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement