@Reusable
public class CalculatorSkylight
Adapted from AndroidX's (internal) TwilightCalculator class.
Values returned are a bit "fuzzy"; that is, you can get different SkylightInfo for the same location on the same day depending on the exact input time. This difference has been noted to range up to almost 1 minute, but has not been tested extensively. Handle the returned calculation accordingly.
| Constructor and Description |
|---|
CalculatorSkylight()
Adapted from AndroidX's (internal) TwilightCalculator class.
|
| Modifier and Type | Method and Description |
|---|---|
drewhamilton.skylight.SkylightDay |
getSkylightDay(drewhamilton.skylight.Coordinates coordinates,
java.time.LocalDate date,
java.time.ZoneId zoneId)
Calculates the SkylightDay based on the given
coordinates and date. Events in the returned SkylightDay
are in the given zoneId. |
@Inject public CalculatorSkylight()
Adapted from AndroidX's (internal) TwilightCalculator class.
Values returned are a bit "fuzzy"; that is, you can get different SkylightInfo for the same location on the same day depending on the exact input time. This difference has been noted to range up to almost 1 minute, but has not been tested extensively. Handle the returned calculation accordingly.
@NotNull
public drewhamilton.skylight.SkylightDay getSkylightDay(@NotNull
drewhamilton.skylight.Coordinates coordinates,
@NotNull
java.time.LocalDate date,
@NotNull
java.time.ZoneId zoneId)
Calculates the SkylightDay based on the given coordinates and date. Events in the returned SkylightDay
are in the given zoneId.
coordinates,
date,
zoneId