[−][src]Function esbat::daily_lunar_phase
pub fn daily_lunar_phase<Tz: TimeZone>(t: Date<Tz>) -> Phase
Calculates the lunar phase for a given date.
This determines the principal phase (new moon, first quarter, full moon, or third quarter) that
occurs on the date t
or the intermediate phase between the previous and next principal
phases.
use chrono::{Date, TimeZone, Utc}; use esbat::{Phase, daily_lunar_phase}; let t = Utc.ymd(2020, 10, 31); assert_eq!(daily_lunar_phase(t), Phase::FullMoon);