moonphase

package module
v0.0.0-...-d432dfb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2022 License: ISC Imports: 2 Imported by: 0

README

moonphase

MIT licensed

Package moonphase allows calculation of the phase of Moon and other related data. It's an implementation of php-moon-phase in go.

Installation

To install the package on your system, run

go get github.com/dyindude/moonphase

Quick Start

time := time.Date(2007, 10, 1, 24, 0, 0, 0, time.UTC)
//time := time.Now()
m := MoonPhase.New(time)

License

moonphase is released under the MIT License. It is copyrighted by Ivan Menshykov and the contributors acknowledged below.

github.com/dyindude - Andrew Missel

Acknowledgments

This package's code and documentation are very closely derived from the php-moon-phase PHP class for calculating the phase of the Moon created by Samir Shah.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Moon

type Moon struct {
	// contains filtered or unexported fields
}

func New

func New(t time.Time) (moonP *Moon)

func (*Moon) Age

func (m *Moon) Age() float64

func (*Moon) DegreesInSignSidereal

func (m *Moon) DegreesInSignSidereal() float64

func (*Moon) DegreesInSignTropical

func (m *Moon) DegreesInSignTropical() float64

func (*Moon) Diameter

func (m *Moon) Diameter() float64

func (*Moon) Distance

func (m *Moon) Distance() float64

func (*Moon) FirstQuarter

func (m *Moon) FirstQuarter() float64

func (*Moon) FullMoon

func (m *Moon) FullMoon() float64

func (*Moon) Illumination

func (m *Moon) Illumination() float64

func (*Moon) LastQuarter

func (m *Moon) LastQuarter() float64

func (*Moon) Longitude

func (m *Moon) Longitude() float64

func (*Moon) NewMoon

func (m *Moon) NewMoon() float64

func (*Moon) NextFirstQuarter

func (m *Moon) NextFirstQuarter() float64

func (*Moon) NextFullMoon

func (m *Moon) NextFullMoon() float64

func (*Moon) NextLastQuarter

func (m *Moon) NextLastQuarter() float64

func (*Moon) NextNewMoon

func (m *Moon) NextNewMoon() float64

func (*Moon) Phase

func (m *Moon) Phase() float64

func (*Moon) PhaseName

func (m *Moon) PhaseName() string

func (*Moon) SunDiameter

func (m *Moon) SunDiameter() float64

func (*Moon) SunDistance

func (m *Moon) SunDistance() float64

func (*Moon) ZodiacSign

func (m *Moon) ZodiacSign() string

func (*Moon) ZodiacSignSidereal

func (m *Moon) ZodiacSignSidereal() string

func (*Moon) ZodiacSignTropical

func (m *Moon) ZodiacSignTropical() string

Directories

Path Synopsis
example that prints out a timestamp including some information about the position of the Moon in the zodiac example output: 11:11PM Luna: New Moon 0.65%, Scorpio 11.957°
example that prints out a timestamp including some information about the position of the Moon in the zodiac example output: 11:11PM Luna: New Moon 0.65%, Scorpio 11.957°

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL