mirror of
https://github.com/hexahigh/080609.git
synced 2025-12-11 19:55:06 +01:00
maybe i should stick to milleseconds
This commit is contained in:
parent
f084d62f88
commit
88c3af924a
@ -22,7 +22,7 @@
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<p>Want to know how old you are in nanoseconds? <a href="ms.html">Go here</a></p>
|
||||
<p>Want to know how old you are in millieseconds? <a href="ms.html">Go here</a></p>
|
||||
<h3>What day was my birthday Jun 8, 2009?</h3>
|
||||
<p>June 8, 2009 was a Monday and it was the 159th day of the year 2009. It was the 23rd Monday of that year. The
|
||||
next time you can reuse your old 2009 calendar will be in 2026. Both calendars will be exactly the same!
|
||||
|
||||
2
ms.html
2
ms.html
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>How old are you in nanoseconds?</title>
|
||||
<title>How old are you in millieseconds?</title>
|
||||
<script src="ms.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
7
ms.js
7
ms.js
@ -2,11 +2,8 @@ function calculateYearsSince() {
|
||||
const myDate = new Date('2009-06-08');
|
||||
|
||||
const diffInMs = Date.now() - myDate.getTime();
|
||||
const diffInNs = diffInMs * 1000000
|
||||
|
||||
document.getElementById("number").innerText = diffInNs
|
||||
document.getElementById("number").innerText = diffInMs
|
||||
}
|
||||
|
||||
while (true) {
|
||||
calculateYearsSince()
|
||||
}
|
||||
setInterval(calculateYearsSince, 0.1)
|
||||
Loading…
x
Reference in New Issue
Block a user