Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 1.38 KB

README.md

File metadata and controls

19 lines (16 loc) · 1.38 KB

SunsetSunriseTime

Simple Python code that outputs the local sunset and sunrise time at your location on a given date.

Usage

Running

  1. Open up a terminal and navigate to the directory the file is saved in.
  2. Then call: python3 SunsetSunriseData.py.
  3. You'll be prompted for a location and a date.
  4. Your sunrise and sunset times will be outputed in the terminal.

How It Works

  1. The user inputs a location and date.
  2. The Geocode API translates the location to a latitude and longitude.
  3. These latitude and longitude coordinates along with the date are used to determine the sunrise/sunset times.
  4. The Timezone API also uses latitude, longitude, and date to determine the location's timezone.
  5. Finally, the times are converted from UTC to local time and outputed to the console.