Open In App
Related Articles

Project Idea | Sun Rise/Set Time Finder

Improve Article
Save Article
Like Article

Project Title : Dawn-Dusk | A web portal to calculate Sun rise and Sun set Time.

You can see the web portal live here.

Introduction: The aim of the project is to provide a web portal which helps in calculating sunset or sun time for any location of the world on any specified date. Let say we want to find sunset and sunrise time in Chandni Chowk, New Delhi, Delhi, India on 15 July 2017. Then using this web portal we can easily find it.

Programming Tools and Frameworks Used :

  • HTML
  • CSS
  • Javascript
  • JSON
  • jQuery
  • Materialize CSS
  • Google Maps API
  • Sunrise-Sunset API

Procedure :

  1. Use Materialize CSS to build front end.
    On PC it will look like something :

    On mobile it will look like something :

  2. Use google map javascript API to get hint for searching a place. Also get latitude and longitude of center of that location.
  3. Use Sun Rise Sun Set API to get sun set/rise time in JSON format. To achieve this we need to make an AJAX request to above API and obtain the JSON result.
  4. After extracting result from sun rise sun set API, display the result.

You can find the whole source code here on GitHub: Dawn-Dusk

You can see the web portal live here.

This article is contributed by Pratik Chhajer. If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

Last Updated : 09 Aug, 2019
Like Article
Save Article
Similar Reads