Created
October 28, 2013 22:48
-
-
Save jdorrance/7206181 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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