Struct solnedgang::SunriseSunsetCalculator [−][src]
pub struct SunriseSunsetCalculator { /* fields omitted */ }
Expand description
Calculator for determine the sunrise and sunset times.
Implementations
Calculates the the time for the sunrise in minutes from midnight (UTC).
Arguments
date
- The date for which the sunrise time should be calculated for.
Trait Implementations
Create a new instance of the SunriseSunsetCalculator
class based on the location supplied.
Examples
Create the calculator for Düsseldorf, Germany:
use solnedgang::{SunriseSunsetCalculator, Coordinates};
let duesseldorf = Coordinates::new(51.21794, 6.76165);
let calculator = SunriseSunsetCalculator::from(duesseldorf);