Last active
March 24, 2017 18:16
-
-
Save niamu/4575e22293f434b9f8ad5f1b7a5881b4 to your computer and use it in GitHub Desktop.
Swatch Internet Time (Beats Time)
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
;; https://en.wikipedia.org/wiki/Swatch_Internet_Time | |
(defn beats | |
[] | |
(let [d (js/Date.)] | |
(->> (/ (+ (.getUTCSeconds d) | |
(* (.getUTCMinutes d) 60) | |
(* (inc (.getUTCHours d)) 3600)) | |
86.4) | |
(.floor js/Math)))) | |
(println (str "@" (beats))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment