Embed URL


SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

evaluate some code at a given DateTime

View do-at*.clj
1 2 3 4 5 6 7 8 9 10
(defn do-at* [date-time f]
(DateTimeUtils/setCurrentMillisFixed (.getMillis date-time))
(finally (DateTimeUtils/setCurrentMillisSystem))))
;; you might use this code like this:
(do-at* (DateMidnight. 2000 1 1)
(fn [] (DateMidnight.))) ;;=> (DateMidnight. 2000 1 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.