Skip to content

Instantly share code, notes, and snippets.

@jdorrance
Created October 28, 2013 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdorrance/7206181 to your computer and use it in GitHub Desktop.
Save jdorrance/7206181 to your computer and use it in GitHub Desktop.
(defn format-date [publication-date]
(format-date (-> publication-date (add-days 90) (add-hours 12) (add-minutes (- (rand-int 60) 30)))))
(defn off-time [entry]
(let [status (-> entry :NewsManagement :PublishingStatus)]
(case status
"Usable" format-date(pubdate entry)
"Embargoed" now
"Withheld" now
"Canceled" now
format-date(pubdate entry))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment