Last active
September 8, 2020 20:29
-
-
Save stuarthalloway/60abf20623e4b63bc4aa619f4cce9d38 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 squuid-created-at | |
"Pull the date back out of a squuid. This will be nonsense if the UUID | |
passed in was not a squuid!" | |
[^java.util.UUID uuid] | |
(let [secs (bit-shift-right (.getMostSignificantBits uuid) 32)] | |
(java.util.Date. (* secs 1000)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment