Created
October 21, 2014 00:52
-
-
Save simplyluke/6393845ad426624fa32c to your computer and use it in GitHub Desktop.
Print age
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
// April Zero Style | |
$(document).ready(function() { | |
var year = 31536000730; | |
function age(){ | |
var now = Date.now(); | |
var myAge = now - (new Date(1997, 11, 19)); | |
var years = myAge/year; | |
return years.toString().substring(0, 15); | |
} | |
function updateAge() { | |
} | |
setInterval(function(){ | |
$('#age').text(age()); | |
}, 10); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment