timeUtil

package
v1.3.28 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormatNormal     = "2006-01-02 15:04:05"
	FormatNormalDate = "2006-01-02"
)
View Source
const (
	Millisecond int64 = 1
	Second      int64 = 1000 * Millisecond
	Minute      int64 = 60 * Second
	Minute2     int64 = 2 * Minute
	Minute3     int64 = 3 * Minute
	Minute5     int64 = 5 * Minute
	Minute10    int64 = 10 * Minute
	Minute15    int64 = 15 * Minute
	Minute20    int64 = 20 * Minute
	Minute30    int64 = 30 * Minute
	Hour        int64 = 60 * Minute
	Day         int64 = 24 * Hour
	Week        int64 = 7 * Day
	Month       int64 = 30 * Day
)

Variables

This section is empty.

Functions

func DayStart

func DayStart(t int64) int64

func FormatDate

func FormatDate(t int64, dateStyle string) string

func FormatStyle

func FormatStyle(style string) string

func FormatTime

func FormatTime(t time.Time, format string) string

func Milli

func Milli() int64

func MonthStart

func MonthStart(t int64) int64

func Nano

func Nano() int64

func NewTs

func NewTs(year int, month time.Month, day, hour, min, sec, nsec int) time.Time

func NextMonth

func NextMonth(t int64) int64

func NowDayTime

func NowDayTime() time.Time

func NowHourTime

func NowHourTime() time.Time

func NowNormal

func NowNormal() string

func NowTo

func NowTo(dateStyle string) string

func ParseTime

func ParseTime(val string, format ...string) (time.Time, error)

func ParseTimeNormal

func ParseTimeNormal(t time.Time) string

func StrToInt

func StrToInt() int64

func ToDayTime

func ToDayTime(t time.Time) time.Time

func ToHourTime

func ToHourTime(t time.Time) time.Time

func ToTimeStamp

func ToTimeStamp(t string, dateStyle string) int64

func ToyyyyMM

func ToyyyyMM() string

func ToyyyyMMInt

func ToyyyyMMInt() int32

func ToyyyyMMIntByStamp

func ToyyyyMMIntByStamp(time int64) int32

func ToyyyyMMdd

func ToyyyyMMdd() string

func ToyyyyMMddHH

func ToyyyyMMddHH() string

func ToyyyyMMddHHInt

func ToyyyyMMddHHInt() int32

func ToyyyyMMddHHIntByStamp

func ToyyyyMMddHHIntByStamp(time int64) int32

func ToyyyyMMddHHmmss

func ToyyyyMMddHHmmss() string

func ToyyyyMMddInt

func ToyyyyMMddInt() int32

func ToyyyyMMddIntByStamp

func ToyyyyMMddIntByStamp(time int64) int32

Types

This section is empty.

Jump to

Keyboard shortcuts

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