Skip to content

Instantly share code, notes, and snippets.

@tomo3141592653
Created May 17, 2012 03:14
Show Gist options
  • Save tomo3141592653/2715948 to your computer and use it in GitHub Desktop.
Save tomo3141592653/2715948 to your computer and use it in GitHub Desktop.
ひらたともよしの人生がどれくらい終了したか分かるページ
<p id="countdown_death_per" style="font-size: x-large;">&nbsp;</p>
<script type="text/javascript">// <![CDATA[
function tokei_death_per(){
var now =new Date();
var birth_year = new Date("Apr 23, 1980 0:0:0");
var sec = -( birth_year.getTime() - now.getTime())/1000;
var per = sec/31556926/80.37 *100;
field= document.getElementById('countdown_death_per')
field.innerHTML=("平田朋義の人生はおよそ"
+per.toFixed(11)+ "%終了しました。"
)
}
setInterval("tokei_death_per()",100);
// ]]></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment