Supports importing mama lu

This commit is contained in:
Bryce Covert
2019-10-21 23:25:36 -07:00
parent 8df6fb0279
commit 823d4998a7
4 changed files with 127 additions and 42 deletions

View File

@@ -0,0 +1,25 @@
(ns auto-ap.parse.util
(:require [clj-fuzzy.metrics :as m]
[clojure.java.shell :as sh]
[clojure.string :as str]
[clj-time.format :as f]
[clj-time.core :as time]))
(defmulti parse-value (fn [method _ _]
method))
(defmethod parse-value :trim-commas
[_ _ value]
(str/replace value #"," "")
)
(defmethod parse-value :clj-time
[_ format value]
(time/from-time-zone (f/parse (f/formatter format) value)
(time/time-zone-for-id "America/Los_Angeles")))
(defmethod parse-value nil
[_ _ value]
value)