Skip to content
/ moon Public

Moon phase calculation, physical data and parameters of the Moon

License

Notifications You must be signed in to change notification settings

biter777/moon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

moon

  • 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

GoDev DOI GolangCI GolangCI GoReport Codiga Codacy Badge License Build status CLDR DMCA.com Protection Status Dependencies Free Gluten Free PRs Welcome DepShield Badge Stars

installation

go get github.com/biter777/moon
import "github.com/biter777/moon"

usage

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.

Contributing

  1. Welcome pull requests, bug fixes and issue reports

    Contributors list

  2. Donate - a donation isn't necessary, but it's welcome.

    Donate using Liberapay ko-fi

  3. Star us - give us a star, please, if it's not against your religion :)

    Stars

About

Moon phase calculation, physical data and parameters of the Moon

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages