Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <style type="text/css"> /* I got some /style/ */
- body {background-color:#BACAFE;} /* Do I need to explain this one? */
- p {color:#010101; /* Well I can't just leave BACAFE by itself, now can I? */
- text-align:center; /* This aligns the text in the center of whatever box it is in. */
- }
- #splanet_block
- { /* This is the CSS for the Starter Planet Clock. */
- width:200px;
- border:4px solid #FFC000; /* Attempt at making a shade of gold */
- margin:auto; /* This centers the block in the screen, might change this later. */
- background-color:#DCC57F; /* Halfway Blend between gold and BACAFE. */
- }
- #splanet_village
- {
- text-align:left
- }
- #v0earth_block
- { /* This is the CSS for the Earth Clock... with timing to events on other planets */
- width:650px;
- border:4px solid #0000FF; /* Blue. */
- margin:auto; /* This centers the block in the screen, might change this later. */
- background-color:#5D65FF; /* Halfway Blend between Blue and BACAFE. */
- }
- #unix_block
- { /* This is the CSS for the Unix Clock. */
- width:200px;
- border:4px solid #000000; /* Black. */
- margin:auto; /* This centers the block in the screen, might change this later. */
- background-color:#5D657F; /* Halfway Blend between Black and BACAFE. */
- }
- </style>
- <script>
- var myVar=setInterval(function(){univeral_loop()},1000); // It actually would check every millisecond if that 1000 was not there. //
- function univeral_loop()
- {
- var unix = Math.round(+new Date() / 1000);
- var splanet_year = Math.floor((unix-1387670400)/38750400); // splanet stands for Starter Planet, obviously. //
- var splanet_yrem = ((unix-1387670400) % 38750400);
- var splanet_day = Math.floor(splanet_yrem / 93600);
- var splanet_drem = splanet_yrem % 93600;
- var splanet_hour = Math.floor(splanet_drem / 3600);
- var splanet_hrem = splanet_drem % 3600;
- var splanet_min = Math.floor(splanet_hrem / 60);
- var splanet_sec = splanet_hrem % 60;
- if (splanet_sec<10)
- {
- splanet_secmin=":0";
- }
- else
- {
- splanet_secmin=":";
- }
- if (splanet_min<10)
- {
- splanet_hourmin=":0";
- }
- else
- {
- splanet_hourmin=":";
- }
- document.getElementById('splanet_dayname').innerHTML = "Day " + splanet_day + " of Year " + splanet_year;
- document.getElementById('splanet_clock').innerHTML = "The time is " + splanet_hour + splanet_hourmin + splanet_min + splanet_secmin + splanet_sec;
- var UTCdate = new Date();
- var earthdate = UTCdate.toUTCString();
- document.getElementById('v0earth_gmt').innerHTML = earthdate;
- var splanet_vanyear = Math.floor((unix-1387670400)/38750400);
- var splanet_vanyear2 = Math.floor(38750400+38750400*splanet_vanyear);
- var splanet_vanyear3 = Math.floor(splanet_vanyear2-(unix-1387670400));
- var vanyear_day = Math.floor(splanet_vanyear3 / 86400);
- var vanyear_drem = splanet_vanyear3 % 86400;
- var vanyear_hour = Math.floor(vanyear_drem / 3600);
- var vanyear_hrem = vanyear_drem % 3600;
- var vanyear_min = Math.floor(vanyear_hrem / 60);
- var vanyear_sec = vanyear_hrem % 60;
- document.getElementById('splanet_newyear').innerHTML = vanyear_day + " Days, " + vanyear_hour + " Hours, " + vanyear_min + " Minutes, and " + vanyear_sec + " Seconds " + "until Year " + (splanet_year+1) + " on Starter Planet.";
- document.getElementById('unix_clock').innerHTML = unix;
- }
- </script>
- <!--
- I used to have a method for doing 1st, 2nd, ect, but it broke so I got rid of it. Here, have it.
- if (day>13)
- {
- var dcal=day%10
- }
- else
- {
- var dcal=day
- }
- if (dcal=1)
- {
- var nend="st"
- }
- else if (dcal=2)
- {
- var nend="nd"
- }
- else if (dcal=3)
- {
- var nend="rd"
- }
- else
- {
- var nend="th"
- }
- -->
- <div id=v0earth_block>
- <p><b>Vanilla Earth</b></p>
- <p id="v0earth_gmt"></p>
- <p id="splanet_newyear"></p>
- </div>
- <p>
- <div id=splanet_block>
- <p><b>Starter Planet</b></p>
- <p id="splanet_dayname"></p>
- <p id="splanet_clock"></p>
- <p id="splanet_village">Sunrise: 6 to 7<br>Noon: 13<br>Sunset: 19 to 20<br>Midnight: 26
- </p>
- </div>
- <p>
- <div id=unix_block>
- <p><b>Unix Time</b></p>
- <p id="unix_clock"></p>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment