julian

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	JULIAN_ADJUSTMENT = 1721425
)

Variables

This section is empty.

Functions

This section is empty.

Types

type JulianDay

type JulianDay uint32

func FromString

func FromString(buffer string) JulianDay

FormatFrom "YYYY-MM-DD" to julianDay

func FromUint32

func FromUint32(days uint32) JulianDay

convert base 10 uint32 YYYYMMDD to julianDay

func NewJulianDay

func NewJulianDay(years, months, day int) JulianDay

newJulianDay

	Calc Julian Day with year, month, day
      year > 0 for AD
		 year<=0, year-1 for BC

func ParseJulianDay

func ParseJulianDay(pic, date string) (res JulianDay)

ParseJulianDay Converts from formatted Date Data long julian Date format

format like "CCYYMMDD", "CCYY-MM-DD"
	C for century, Y for year, M month, D day

func (JulianDay) Add

func (jDN JulianDay) Add(nDays int) JulianDay

forward nDays

func (JulianDay) Date added in v0.1.1

func (jDN JulianDay) Date() (y, m, d int)

Date

Fast convert julian date to year, month, day

func (JulianDay) GetYMD

func (tot_days JulianDay) GetYMD() (year, month, day int, err error)

GetYMD

Converts from the julian date format to year/month/day format

func (JulianDay) String

func (jDN JulianDay) String() string

func (JulianDay) String8

func (julianDay JulianDay) String8() string

return "YYYYMMDD" string

func (JulianDay) Sub

func (jDN JulianDay) Sub(j JulianDay) int

func (JulianDay) UTC added in v0.1.1

func (jDN JulianDay) UTC() time.Time

return UTC time.Time

func (JulianDay) Uint32

func (jDN JulianDay) Uint32() uint32

return YYYYMMDD base 10 uint32

func (JulianDay) Weekbase added in v0.1.2

func (jDN JulianDay) Weekbase() JulianDay

return weekBase sunday julianDay

func (JulianDay) Weekday added in v0.1.2

func (jDN JulianDay) Weekday() time.Weekday

return Weekday time.Weekday

Jump to

Keyboard shortcuts

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