Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 662 Bytes

File metadata and controls

19 lines (13 loc) · 662 Bytes

About

Daylight-clock is a JavaScript/HTML5 widget to display sunrise/sunset times and day/night lengths for your own location and time zone.

External components:

  • Location detection is implemented using MaxMind.com’s GeoIP service
  • Sunrise algorithm implementation by Preston Hunt

Put daylight-clock on your own site

Include the following lines in a HTML page:

<canvas id="daylight-clock" width="400" height="400"></canvas>
<script type="text/javascript" src="./SunriseSunset.js"></script>
<script type="text/javascript" src="http://j.maxmind.com/app/geoip.js"></script>
<script type="text/javascript" src="./daylight-clock.js"></script>