util

package
v0.0.0-...-dddda54 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: GPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const J2000 = 2451545.0

Gregorian历TT2000年1月1日中午12点的儒略日

Variables

This section is empty.

Functions

func GetDateFromJulianDay

func GetDateFromJulianDay(jd float64) (yy, mm, dd int)

GetDateFromJulianDay 从儒略日中获取公历的日期

func GetDateTimeFromJulianDay

func GetDateTimeFromJulianDay(jd float64) time.Time

GetDateTimeFromJulianDay 将儒略日转换为 time.Time 其中包含了 TT 到 UTC 的转换

func GetDeltaT

func GetDeltaT(year, month int) float64

GetDeltaT 计算地球时和UTC的时差,算法摘自 http://eclipse.gsfc.nasa.gov/SEhelp/deltatpoly2004.html NASA网站 ∆T = TT - UT 此算法在-1999年到3000年有效

func GetJulianCentury

func GetJulianCentury(jd float64) float64

GetJulianCentury 计算儒略世纪数

func GetJulianThousandYears

func GetJulianThousandYears(jd float64) float64

GetJulianThousandYears 计算儒略千年数

func GetSolarMonthDays

func GetSolarMonthDays(year, month int) int

GetSolarMonthDays 获取公历月份的天数

func GetTimeFromJulianDay

func GetTimeFromJulianDay(jd float64) (hour, minute, second int)

GetTimeFromJulianDay 从儒略日中获取时间 时分秒

func GetWeekday

func GetWeekday(y, m, d int) int

GetWeekday 计算Gregorian日历的星期几 算法摘自 http://en.wikipedia.org/wiki/Zeller%27s_congruence 返回星期几的数字表示,1-6表示星期一到星期六,0表示星期日

func GetYearDaysCount

func GetYearDaysCount(year int) int

GetYearDaysCount 获取某年的天数

func IsLeapYear

func IsLeapYear(year int) bool

IsLeapYear 公历闰年判断

func JDBeijingTime2UTC

func JDBeijingTime2UTC(bjtJD float64) float64

JDBeijingTime2UTC 儒略日 北京时间到 UTC 时间

func JDUTC2BeijingTime

func JDUTC2BeijingTime(utcJD float64) float64

JDUTC2BeijingTime 儒略日 UTC 时间转换到北京时间

func ToJulianDate

func ToJulianDate(year, month, day int) int

ToJulianDate 计算Gregorian日期的儒略日数,以TT当天中午12点为准(结果是整数)。 算法摘自 http://en.wikipedia.org/wiki/Julian_day

func ToJulianDateHMS

func ToJulianDateHMS(year, month, day, hour, minute int, second float64) float64

ToJulianDateHMS 计算Gregorian时间的儒略日数 算法摘自 http://en.wikipedia.org/wiki/Julian_day

Types

This section is empty.

Jump to

Keyboard shortcuts

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