Last active
August 29, 2015 14:10
-
-
Save demmer/295455ec8a2f20cdd737 to your computer and use it in GitHub Desktop.
Playground launch countdown
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
// Simple juttle program to show a big metric tile counting down the time until | |
// the launch of playground | |
const launch = :2014-12-10 12:10:14 PST:; | |
function format(value) { | |
var days = Duration.get(value, 'day'); | |
var hours = Duration.get(value, 'hour'); | |
var minutes = Duration.get(value, 'minutes'); | |
var seconds = Duration.get(value, 'seconds'); | |
var ret = ''; | |
if (days != 0) { ret = ret + days + " Days, "; } | |
ret = ret + hours + " Hours, " + minutes + " Minutes, " + seconds + " Seconds"; | |
return ret; | |
} | |
emitter -limit 99999999999 | put value = format(launch - time) | @tile -title "Playground Launch Countdown" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment