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
Modifier and TypeClassDescriptionstatic interface
Collects all parameters forSunTimes
.static enum
Enumeration of predefined twilights. -
Method Summary
Modifier and TypeMethodDescriptionstatic SunTimes.Parameters
compute()
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.boolean
true
if the sun never rises/sets, but is always below the twilight angle.boolean
true
if the sun never rises/sets, but is always above the twilight angle.toString()
-
Method Details
-
compute
Starts the computation ofSunTimes
.- Returns:
SunTimes.Parameters
to set.
-
getRise
Sunrise time.null
if the sun does not rise that day.Always returns a sunrise time if
WindowParameter.fullCycle()
was set. -
getSet
Sunset time.null
if 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
true
if the sun never rises/sets, but is always above the twilight angle. -
isAlwaysDown
true
if the sun never rises/sets, but is always below the twilight angle. -
toString
-