Package org.shredzone.commons.suncalc
Class MoonPhase
java.lang.Object
org.shredzone.commons.suncalc.MoonPhase
Calculates the date and time when the moon reaches the desired phase.
Note: Due to the simplified formulas used in suncalc, the returned time can have an error of several minutes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCollects all parameters forMoonPhase.static enumEnumeration of moon phases. -
Method Summary
Modifier and TypeMethodDescriptionstatic MoonPhase.Parameterscompute()Starts the computation ofMoonPhase.doubleGeocentric distance of the moon at the given phase, in kilometers.getTime()Date and time of the desired moon phase.booleanChecks if the moon is in a MicroMoon position.booleanChecks if the moon is in a SuperMoon position.toString()
-
Method Details
-
compute
Starts the computation ofMoonPhase.- Returns:
MoonPhase.Parametersto set.
-
getTime
Date and time of the desired moon phase. The time is rounded to full minutes. -
getDistance
Geocentric distance of the moon at the given phase, in kilometers.- Since:
- 3.4
-
isSuperMoon
Checks if the moon is in a SuperMoon position.Note that there is no official definition of supermoon. Suncalc will assume a supermoon if the center of the moon is closer than 360,000 km to the center of Earth. Usually only full moons or new moons are candidates for supermoons.
- Since:
- 3.4
-
isMicroMoon
Checks if the moon is in a MicroMoon position.Note that there is no official definition of micromoon. Suncalc will assume a micromoon if the center of the moon is farther than 405,000 km from the center of Earth. Usually only full moons or new moons are candidates for micromoons.
- Since:
- 3.4
-
toString
-