diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..a3a7999 Binary files /dev/null and b/favicon.ico differ diff --git a/index.html b/index.html index c4f88d2..82b47ff 100644 --- a/index.html +++ b/index.html @@ -24,20 +24,6 @@
- + - \ No newline at end of file + diff --git a/init.js b/init.js new file mode 100644 index 0000000..1c77028 --- /dev/null +++ b/init.js @@ -0,0 +1,13 @@ +var calculate = function(){ + var start = moment("2015-07-02"), + end = moment(), + diff = end.diff(start), + duration = moment.duration(diff); + var answer = duration.years() + " Years " + duration.months() + " Months " + duration.days() + " Days " + duration.hours() + " Hours " + duration.minutes() + " Minutes " + duration.seconds() + " Seconds"; + var elem = document.getElementById('answer'); + elem.innerHTML = answer; +}; + window.setInterval(function(){ + calculate(); +}, 1000); +calculate();