- Moon phase calculation
- Moon age calculation
- Angular diameter
- Distance to Earth
- Distance to Sun
- True Moon longitude
- Luminous Fraction of the Moon
- Physical data and parameters of the Moon
- Emoji supported
- Supported languages: English, French, German, Spanish, Italian, Russian, Ukrainian
go get github.com/biter777/moon
import "github.com/biter777/moon"
m := moon.New(time.Now())
fmt.Printf("Moon phase with emoji: %v\n", m.PhaseName(language.English, true))
fmt.Printf("Moon illumination: %v\n", int(m.Illumination*100)+"%")
fmt.Printf("Moon day (Moon age): %v\n", int(m.Age))
fmt.Printf("Full Moon in the current cycle at: %v\n", m.FullMoon())
fmt.Printf("Full Moon in the next cycle at: %v\n", m.NextFullMoon())
fmt.Printf("New Moon in the current cycle at: %v\n", m.NewMoon())
fmt.Printf("New Moon in the next cycle at: %v\n", m.NextNewMoon())
fmt.Printf("Diameter: %v\n", m.Diameter)
fmt.Printf("Distance: %v\n", m.Distance)
fmt.Printf("Longitude: %v\n", m.Longitude)
fmt.Printf("Sun distance: %v\n", m.SunDistance)
fmt.Printf("Sun angular diameter: %v\n", m.SunAngularDiameter)
fmt.Printf("Density: %v\n", moon.Density)
fmt.Printf("AverageDiameter: %v\n", moon.AverageDiameter)
fmt.Printf("AverageDistance: %v\n", moon.AverageDistance)
fmt.Printf("Gravity: %v\n", moon.Gravity)
fmt.Printf("Mass: %v\n", moon.Mass)
fmt.Printf("Average radius: %v\n", moon.AverageRadius)
fmt.Printf("Square: %v\n", moon.Square)
fmt.Printf("Synodic month: %v\n", moon.SynodicMonth)
For more complex options, consult the documentation.
-
Welcome pull requests, bug fixes and issue reports
-
Donate - a donation isn't necessary, but it's welcome.
-
Star us - give us a star, please, if it's not against your religion :)