Ep 015: Finding the Time

Play Episode

Nate spends some time figuring out how to track his time.

Clojure in this episode:

Related projects:

Code sample from this episode:

(def timestamp-re #"(\w+)\s(\w+)\s(\d+)\s(\d+)\s+(\d{2}):(\d{2})-(\d{2}):(\d{2})")

(with-open [rdr (clojure.java.io/reader "time-log.txt")]
  (doseq [line (line-seq rdr)]
    (when-let [[whole d m dt yr hs ms he me] (re-matches timestamp-re line)]
      (println whole))))