[−][src]Function circadia::time_of_event
pub fn time_of_event(
date: Date<Utc>,
pos: &GlobalPosition,
event: SunEvent
) -> Option<DateTime<Utc>>
Calculates the time of the sunrise/sunset on the given date at the given position on the globe.
This is an implementation of the algorithm described by the United states Naval Observatory found here: http://edwilliams.org/sunrise_sunset_algorithm.htm
Returns None if the sun never sets/rises on that day (ie if you're in the arctic).