Days

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: MIT Imports: 1 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get64TimeStamp

func Get64TimeStamp(nYear, nMonth, nDay, nHour, nMinute, nSecond int) int64

获取64位时间戳

func Get64TimeStampFromDate

func Get64TimeStampFromDate(dt TDate) int64

从日期计算时间戳

func GetAllDays

func GetAllDays(nYear, nMonth, nDay int) int

获得距公元原点的日数 这里是公历的年月日

func GetBasicDays

func GetBasicDays(nYear, nMonth, nDay int) int

获取基本数据

func GetCalendarType

func GetCalendarType(nYear, nMonth, nDay int) int

根据公历日期判断当时历法

func GetDateFrom64TimeStamp

func GetDateFrom64TimeStamp(nTimeStamp int64) TDate

从64位时间戳反推日期

func GetDateIsValid

func GetDateIsValid(nYear, nMonth, nDay int) bool

返回公历日期是否合法

func GetDiffDate

func GetDiffDate(nYear1, nMonth1, nDay1, nHour1, nMinute1, nSecond1 int, nDiffSecond int64) (int, int, int, int, int, int)

根据秒数, 得到新的差异的天数

func GetDiffDate2

func GetDiffDate2(dt1 TDate, nDiffSecond int64) TDate

根据秒数, 得到新的差异天数

func GetDiffDays

func GetDiffDays(nYear1, nMonth1, nDay1, nYear2, nMonth2, nDay2 int) int

得到两个天数之间的差值

func GetDiffDays2

func GetDiffDays2(dt1 TDate, dt2 TDate) int

得到两个天数之间的差值(通过时间)

func GetDiffSeconds

func GetDiffSeconds(nYear1, nMonth1, nDay1, nHour1, nMinute1, nSecond1 int,
	nYear2, nMonth2, nDay2, nHour2, nMinute2, nSecond2 int) int64

得到两个天数之间的秒数差距

func GetDiffSeconds2

func GetDiffSeconds2(dt1 TDate, dt2 TDate) int64

得到两个天数之间的秒数差距(通过日期)

func GetGanZhiFromDay

func GetGanZhiFromDay(nAllDays int) int

获得某公历日的天干地支,0-59 对应 甲子到癸亥

func GetGanZhiFromHour

func GetGanZhiFromHour(nHour, nGan int) (int, int)

获得某公历时的天干地支,0-59 对应 甲子到癸亥

func GetIsLeapYear

func GetIsLeapYear(nYear int) bool

返回某公历是否闰年

func GetLeapDays

func GetLeapDays(nYear, nMonth, nDay int) int

获取闰年天数

func GetMonthDays

func GetMonthDays(nYear, nMonth int) int

取本月天数,不考虑 1582 年 10 月的特殊情况

func GetMonthFrom64TimeStamp

func GetMonthFrom64TimeStamp(nTimeStamp int64, nYear int) (int, int64)

从64位时间戳反推月, 返回月份和剩余时间戳

func GetYearFrom64TimeStamp

func GetYearFrom64TimeStamp(nTimeStamp int64) int

从64位时间戳反推年

Types

This section is empty.

Jump to

Keyboard shortcuts

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