Sunrise/sunset clock on HTML5 canvas.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
css
images
js
.gitignore
24h.html
404.html
COPYING
README.org
SunriseSunset.js
apple-touch-icon.png
config.xml
crossdomain.xml
daylight-clock.js
favicon.ico
icon.png
index.html
robots.txt
web.config

README.org

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>