-
Notifications
You must be signed in to change notification settings - Fork 0
/
thirds.html
143 lines (107 loc) · 4.99 KB
/
thirds.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html>
<html lang="en">
<head>
<title>Base 60 time extension</title>
<meta property="og:site_name" content="orbit-loona.github.io" />
<meta property="og:type" content="website" />
<meta property="og:title" content="thirds extended both ways" />
<meta property="og:url" content="https://orbit-loona.github.io/thirds.html" />
<meta property="og:description" content="this is useless" />
<meta property="og:locale" content="en_US" />
<meta property="og:image" content="https://orbit-loona.github.io/bin/complaint.png" />
<meta property="og:image:width" content="196" />
<meta property="og:image:height" content="82" />
<meta property="og:image:alt" content="time is such a pain in the *** when it feels like an hour goes by in 15 minutes (i don't think this is normal)" />
<meta name="twitter:image:src" content="https://orbit-loona.github.io/bin/complaint.png" />
<meta name="twitter:title" content="thirds extended both ways" />
<meta name="twitter:description" content="this is useless" />
<link rel="stylesheet" href="main.css"/>
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="An Orbit">
<meta charset="UTF-8">
<style>
.overflow {
color: white;
}
.divider {
color: white;
}
/*
...
[negative ordinals would either be impractically long or sound like the N-word]
zeroth (hour)
first (minute)
second
third
*/
</style>
<script>
//https://stackoverflow.com/a/48020189
function copyDivToClipboard() {
var range = document.createRange();
range.selectNode(document.getElementById("json"));
window.getSelection().removeAllRanges(); // clear current selection
window.getSelection().addRange(range); // to select text
document.execCommand("copy");
window.getSelection().removeAllRanges();// to deselect
}
</script>
</head>
<body>
<h2>Time since Unix epoch</h2>
<span class="pointless">This is pointless</span><br/><br/>
<div id="main">If you can still read this, something has gone wrong.</div>
<span class="t2">gowon color = seconds</span><br/>
<span class="t3">thirds have some inaccuracy</span>
<script>
subdivisionFactor = 60;
var time = 1000/subdivisionFactor;
mainDiv = document.getElementById("main");
function p(textIn) {
var text = textIn;
var negative = false;
if(typeof(text) !== "string") {
text = text.toString()
};
if(text.startsWith("-")) {
text = text.substring(1);
negative = true;
};
if(text == "") {
return "00";
};
if(text.length == 1) {
return (negative ? "-" : "") + "0" + text;
};
return (negative ? "-" : "") + text;
};
function ttswc(textIn,classIn) {
return `<span class="${classIn}">${p(textIn)}</span>`;
}; //textToSpanWithClass
var divider = '<span class="divider">:</span>';
function main() {
var millis = Date.now();
//mainSpan.innerText = millis;
var milliseconds = millis % 1000;
var overflow = Math.floor(millis/(1000*subdivisionFactor**11));
var nEighths = Math.floor(millis/(1000*subdivisionFactor**10) % subdivisionFactor);
var nSevenths = Math.floor(millis/(1000*subdivisionFactor**9) % subdivisionFactor);
var nSixths = Math.floor(millis/(1000*subdivisionFactor**8) % subdivisionFactor);
var nFifths = Math.floor(millis/(1000*subdivisionFactor**7) % subdivisionFactor);
var nFourths = Math.floor(millis/(1000*subdivisionFactor**6) % subdivisionFactor); //12960000 hours (540000 days)
var nThirds = Math.floor(millis/(1000*subdivisionFactor**5) % subdivisionFactor); //216000 hours (9000 days)
var nSeconds = Math.floor(millis/(1000*subdivisionFactor**4) % subdivisionFactor); //3600 hours (150 days)
var nFirsts = Math.floor(millis/(1000*subdivisionFactor**3) % subdivisionFactor); //60 hours (2.5 days)
var zeroths = Math.floor(millis/(1000*subdivisionFactor**2) % subdivisionFactor); //hours
var firsts = Math.floor(millis/(1000*subdivisionFactor) % subdivisionFactor); //minutes
var seconds = Math.floor(millis/1000) % subdivisionFactor;
var thirds = Math.round(milliseconds / time);
mainDiv.innerHTML = [ttswc(overflow,"overflow"),ttswc(nEighths,"heejin"),ttswc(nSevenths,"hyunjin"),ttswc(nSixths,"haseul"),ttswc(nFifths,"yeojin"),ttswc(nFourths,"vivi"),ttswc(nThirds,"kimlip"),ttswc(nSeconds,"jinsoul"),ttswc(nFirsts,"choerry"),ttswc(zeroths,"yves"),ttswc(firsts,"chuu"),ttswc(seconds,"gowon"),ttswc(thirds,"hyeju")].join(divider);
};
setInterval(main, time);
</script>
</body>
<br/><br/><a href="index.html"><small>go to main page</small></a>
</html>