Skip to content

Instantly share code, notes, and snippets.

@rradczewski
Created October 28, 2015 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rradczewski/ba81f2c7f572b1f851de to your computer and use it in GitHub Desktop.
Save rradczewski/ba81f2c7f572b1f851de to your computer and use it in GitHub Desktop.
Decadic Time Function
function decTime() {
var date = new Date();
var oldSeconds = date.getSeconds()+date.getMinutes()*60+date.getHours()*60*60+date.getMilliseconds()/1000;
oldSeconds = oldSeconds/(1-0.136);
var hours = Math.floor(oldSeconds / (100*100));
oldSeconds = oldSeconds % (100*100);
var minutes = Math.floor(oldSeconds / 100);
var seconds = oldSeconds % 100;
return hours+':'+minutes+':'+seconds;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment