Companion

object Companion

Functions

Link copied to clipboard

Takes an angle and finds the closest moon phase to that angle. This can return phases like New Moon which only last for an instant in time. If you are attempting to get the "state" of the moon the lunarPhase method is technically correct.

Link copied to clipboard

Takes an angle and finds the current phase of the moon based on that angle. This will only return intermediate phases like Waning Crescent and not Primary phases like Full Moon as those technically only occur for an instant in time. If you were trying to return the Moon's current phase as a state this is the "technically" correct way to do that. Sometimes we refer to the full Moon as a range of time but there's no agreed upon standard for that so if you wanted that behavior you would need to write your own function.