https://github.com/andrashann/sunrise-sunset
A static site to compare sunrise/sunset times of to places on Earth
https://github.com/andrashann/sunrise-sunset
Last synced: 6 months ago
JSON representation
A static site to compare sunrise/sunset times of to places on Earth
- Host: GitHub
- URL: https://github.com/andrashann/sunrise-sunset
- Owner: andrashann
- License: gpl-3.0
- Created: 2018-03-02T18:48:01.000Z (over 8 years ago)
- Default Branch: gh-pages
- Last Pushed: 2025-11-08T20:51:25.000Z (9 months ago)
- Last Synced: 2025-11-08T22:19:02.065Z (9 months ago)
- Language: JavaScript
- Homepage: http://hann.io/sunrise-sunset
- Size: 690 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sunrise-sunset
A static site to compare sunrise/sunset times of to places on Earth
View the site [here](http://hann.io/sunrise-sunset)
## What's this?
I grew up in Budapest and moved to the Netherlands a few years ago. I could not ignore the fact that the Sun has very different patterns: it rises later and sets later here than in Budapest. However, this difference is not uniform: my feeling was that the sun rises much later and sets about the same time during the winter. I saw the inverse in the summer: Dutch summer evenings are much longer, but dawn does not lag behind that much.
This page lets you compare the dawn/dusk pattern of two arbitrary locations: just click the map to move a marker to your desired location. Hover over the graph to see exact dawn/dusk times.
I used quite a few tools to get this site going:
* [Bootstrap](https://getbootstrap.com/) for the general layout
* [timezonedb.com](https://timezonedb.com)'s API to get time zone information based on geographic coordinates
* the [Nominatim](https://nominatim.openstreetmap.org/) api to get the name of the location that was chosen
* [SunCalc](https://github.com/mourner/suncalc) to calculate dawn/dusk times
* [Datejs](https://github.com/datejs/Datejs) to work with dates
* [C3.js](http://c3js.org/) for the graph
* [Leaflet](http://leafletjs.com/) for the map
* [leaflet-color-markers](https://github.com/pointhi/leaflet-color-markers) for the orange marker on the map.
* [Google Fonts](https://fonts.google.com/) for the typeface (Crimson Text)