Sunrise time calculation

How to calculate sunrise time based on my location.

Would be really hard and complex to calculate it.
You can get it from a database however.
C# Sunrise/Sunset with latitude/longitude - Stack Overflow (or other google results for ‘C# get sunrise time’

Possibly worth checking out if you’re interested in the actual calculation.

1 Like

Awesome library:
https://github.com/Tronald/CoordinateSharp

var coordinates = new Coordinate(47.6062, -122.3321, DateTime.Now);

var sunrise = coordinates.CelestialInfo.SunRise;
var sunset = coordinates.CelestialInfo.SunSet;
3 Likes