dateutil

package
v0.0.31 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 28

Documentation

Index

Constants

View Source
const (
	DATEFORMAT_YEAR        = 'y'
	DATEFORMAT_MONTH       = 'm'
	DATEFORMAT_DAY         = 'd'
	DATEFORMAT_HOUR        = 'H'
	DATEFORMAT_MINUTE      = 'M'
	DATEFORMAT_SECOND      = 'S'
	DATEFORMAT_MILLISECOND = 's'
)
View Source
const (
	MILLIS_PER_SECOND      = 1000
	MILLIS_PER_MINUTE      = 60 * MILLIS_PER_SECOND
	MILLIS_PER_FIVE_MINUTE = 5 * 60 * MILLIS_PER_SECOND
	MILLIS_PER_TEN_MINUTE  = 10 * MILLIS_PER_MINUTE
	MILLIS_PER_HOUR        = 60 * MILLIS_PER_MINUTE
	MILLIS_PER_DAY         = 24 * MILLIS_PER_HOUR
)
View Source
const (
	TIME_SYNC_INTERVAL = 5000
)

Variables

View Source
var SyncTimeMillis int64

Functions

func DateTime

func DateTime(time int64) string

func GetDateUnit

func GetDateUnit(time int64) int64

func GetDateUnitNow

func GetDateUnitNow() int64

func GetDelta

func GetDelta() int64

func GetFiveMinUnit

func GetFiveMinUnit(time int64) int64

func GetMinUnit

func GetMinUnit(time int64) int64

func GetYmdTime

func GetYmdTime(yyyyMMdd string) int64

func HHMM

func HHMM(time int64) string

func HHMMSS

func HHMMSS(time int64) string

func IsSyncTime added in v0.0.16

func IsSyncTime() bool

func LPadInt

func LPadInt(v, size int) string

func Now

func Now() int64

func SetDelta

func SetDelta(t int64)

func SetServerTime

func SetServerTime(serverTime int64, syncfactor float64) int64

func StartSyncTime added in v0.0.15

func StartSyncTime()

func StopSyncTime added in v0.0.15

func StopSyncTime()

func SystemNow

func SystemNow() int64

func TimeStamp

func TimeStamp(time int64) string

func TimeStampNow

func TimeStampNow() string

func WeekDay

func WeekDay(time int64) string

func YYYYMMDD

func YYYYMMDD(time int64) string

func YmdNow

func YmdNow() string

func Ymdhms

func Ymdhms(time int64) string

Types

type DateFormat

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

func NewDateFormat

func NewDateFormat(formatStr string) *DateFormat

func (*DateFormat) Format

func (this *DateFormat) Format() string

func (*DateFormat) FormatTime

func (this *DateFormat) FormatTime(t time.Time) string

func (*DateFormat) Parse

func (this *DateFormat) Parse(dateStr string) (int64, error)

func (*DateFormat) ToInt

func (this *DateFormat) ToInt(rd *bytes.Reader, size int) (int, error)

type DateTimeHelper

type DateTimeHelper struct {
	BASE_TIME int64

	LAST_DATE int
	// contains filtered or unexported fields
}

type Day

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

Jump to

Keyboard shortcuts

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