-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
91 lines (91 loc) · 3.88 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dark Sky Times</title>
<link rel="stylesheet" href="style.css">
</head>
<body id="main_content_wrap" class="inner">
<header>
<h1>Dark Sky Times</h1>
<h3>Calculate the times when the Sun is at least -18 degrees below the horizon and there is no moon present in the sky.</h3>
<p>
Please note:
<ol>It is important to select the time zone that you want the results to be displayed in.</ol>
<ol>If you do not select a time zone, it will default to UTC.</ol>
<ol>When a time zone is selected, daylight saving time rules will automatically be applied to the results.</ol>
</p>
</header>
<main>
<form id="observerForm" method="POST">
<table>
<tr>
<td>Date Start:</td>
<td><input type="date" id="EditDateStart" required></td>
</tr>
<tr>
<td>Date End:</td>
<td><input type="date" id="EditDateEnd" required></td>
</tr>
<tr>
<td>Latitude:</td>
<td><input type="text" id="EditLatitude" pattern="[\-\+]?\d+(\.\d*)?" size="10" required></td>
</tr>
<tr>
<td>Longitude:</td>
<td><input type="text" id="EditLongitude" pattern="[\-\+]?\d+(\.\d*)?" size="10" required></td>
</tr>
<tr>
<td>(display results in) Time Zone:</td>
<td>
<select id="timezoneSelect" size="10"></select>
</td>
</tr>
<tr>
<td>Elevation (m): <br>
The observer's elevation above mean sea level, espressed in meters.<br>
Set to 0 if you don't know.</td>
<td><input type="text" id="EditElevation" value="0" pattern="[\-\+]?\d+(\.\d*)?" size="10" required></td>
</tr>
</table>
<button id="submit-button" type="submit">Submit</button>
</form>
<section>
<h2>Dark Times</h2>
<p>
The times are in the selected time zone. Please note that if the "Dark Time End (Dusk)" is 23:59:59,
and the next day's "Dark Time Start (Dawn)" is 00:00:00, then the dark time window extends into the next day.
</p>
<h2 id="TimeZoneDisplay"></h2>
<table id="CalcTable">
<thead>
<tr>
<th>Date</th>
<th>Dark Time Start (Dawn)</th>
<th>Dark Time End (Dawn)</th>
<th>Dark Time Start (Dusk)</th>
<th>Dark Time End (Dusk)</th>
</tr>
</thead>
<tbody id="DarkTimesBody"></tbody>
</table>
</section>
</main>
<footer>
<p>
All source code and documentation is available <a href="https://github.com/BobbyBoy101/darkSky">here</a>, or you can use your browser's "View Source" command to inspect this page.
</p>
<p>
This page uses <a href="https://github.com/cosinekitty/astronomy/">Astronomy Engine</a> to generate these times.
</p>
<p>
© 2025 darkSky Project. Licensed under the MIT License.
<br>
Cite this work: <a href="https://doi.org/10.5281/zenodo.14847872" target="_blank" rel="noopener noreferrer">https://doi.org/10.5281/zenodo.14847872</a>
</p>
</footer>
<script src="astronomy.browser.js"></script>
<script type="module" src="script.js"></script>
</body>
</html>