Package org.shredzone.commons.suncalc
Class SunTimes
java.lang.Object
org.shredzone.commons.suncalc.SunTimes
Calculates the rise and set times of the sun.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCollects all parameters forSunTimes.static enumEnumeration of predefined twilights. -
Method Summary
Modifier and TypeMethodDescriptionstatic SunTimes.Parameterscompute()Starts the computation ofSunTimes.getNadir()The time when the sun reaches its lowest point.getNoon()The time when the sun reaches its highest point.getRise()Sunrise time.getSet()Sunset time.booleantrueif the sun never rises/sets, but is always below the twilight angle.booleantrueif the sun never rises/sets, but is always above the twilight angle.toString()
-
Method Details
-
compute
Starts the computation ofSunTimes.- Returns:
SunTimes.Parametersto set.
-
getRise
Sunrise time.nullif the sun does not rise that day.Always returns a sunrise time if
WindowParameter.fullCycle()was set. -
getSet
Sunset time.nullif the sun does not set that day.Always returns a sunset time if
WindowParameter.fullCycle()was set. -
getNoon
The time when the sun reaches its highest point.Use
isAlwaysDown()to find out if the highest point is still below the twilight angle. -
getNadir
The time when the sun reaches its lowest point.Use
isAlwaysUp()to find out if the lowest point is still above the twilight angle. -
isAlwaysUp
trueif the sun never rises/sets, but is always above the twilight angle. -
isAlwaysDown
trueif the sun never rises/sets, but is always below the twilight angle. -
toString
-