Package moonphase provides an API to calculate the phase of Moon, and other related variables. It's a port of Ivan Menshykov's goMoonPhase, which is a go port of php-moon-phase
time := time.Date(2007, 10, 1, 24, 0, 0, 0, time.UTC)
//time := time.Now()
m := MoonPhase.New(time)
MoonPhase is released under the MIT License. It is copyrighted by Miguel Verissimo and the contributors acknowledged below.
This module is a port of Ivan Menshykov's goMoonPhase package, which in turn is very closely derived from php-moon-phase PHP class for calculating the phase of the Moon created by Samir Shah.