solarex v0.1.1 Solarex.Moon View Source
Solarex.Moon is module for calculating moon phase for particular date.
This module implements naive approach by calculating the number of days since a known new moon. See Wikipedia page for more info.
Link to this section Summary
Functions
Returns remaining days to next new moon for the passed date using know new moon date and synodic month https://en.wikipedia.org/wiki/Lunar_phase#Calculating_phase
Returns moon phase for the current date.
Calculate moon phase for the passed Date.
Link to this section Functions
days_to_new_moon(date) View Source
Returns remaining days to next new moon for the passed date using know new moon date and synodic month https://en.wikipedia.org/wiki/Lunar_phase#Calculating_phase
iex> Solarex.Moon.days_to_new_moon(~D[2019-05-05])
1
phase()
View Source
phase() :: atom()
phase() :: atom()
Returns moon phase for the current date.
phase(date) View Source
Calculate moon phase for the passed Date.
Returns one of :new_moon
, :waxing_crescent
, :first_quarter
, :waxing_gibbous
,
:full_moon
, :waning_gibbous
, :third_quarter
, :waning_crescent
, :new_moon
atom.
iex> Solarex.Moon.phase(~D[2019-05-05])
:new_moon