Skip to content

Instantly share code, notes, and snippets.

@fogus
Created November 8, 2010 16:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fogus/667927 to your computer and use it in GitHub Desktop.
Save fogus/667927 to your computer and use it in GitHub Desktop.
(defn vectorize-date-str [ds]
(let [[date m d y] (re-matches #"(\d{1,2})\/(\d{1,2})\/(\d{4})" ds)]
[y m d]))
(vectorize-date-str "12/02/1975")
;=> ["1975" "12" "02]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment