dateutil

package
v0.0.0-...-3f61646 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeDivide         = 1000 * 1000
	TimeFormat         = "2006/1/2 15:04:05"
	DataFormat         = "20060102"
	FrontendTimeFormat = "2006-01-02 15:04:05"
)

Variables

View Source
var (
	ShangHaiTimeZone, _ = time.LoadLocation("Asia/Shanghai")
)

Functions

func CheckTimeIsToday

func CheckTimeIsToday(t time.Time) bool

func FormatDateTime

func FormatDateTime(datestr string, srcFormat string, toFormat string) string

func GetCalendarDayDiff

func GetCalendarDayDiff(day_count int64) string

func GetCalendarToday

func GetCalendarToday() string

func GetDatePeriodString

func GetDatePeriodString(dayCount int64) (string, string)

func GetDateTime

func GetDateTime(format, dateStr string) time.Time

func GetDateTimePeriodString

func GetDateTimePeriodString(dayCount int64) (string, string)

func GetDayBeginTime

func GetDayBeginTime(day time.Time) time.Time

func GetDayMiddleTime

func GetDayMiddleTime(t time.Time, cnt int) time.Time

func GetFirstOfMonth

func GetFirstOfMonth() time.Time

* 获取当月第一天

func GetFridayOfWeek

func GetFridayOfWeek(date string) string

func GetLastDayOfMonth

func GetLastDayOfMonth(date string) string

func GetNDayAgo

func GetNDayAgo(cnt int, format string, srcDate string) string

func GetNDayAgoTime

func GetNDayAgoTime(cnt int) time.Time

func GetNMinuteAgo

func GetNMinuteAgo(cnt int) time.Time

func GetNMonthTime

func GetNMonthTime(cnt int) time.Time

func GetNWeeks

func GetNWeeks(cnt int) []string

func GetNextDayMiddle

func GetNextDayMiddle() int64

func GetNextDayMiddleTime

func GetNextDayMiddleTime() time.Time

func GetNowTimestamp

func GetNowTimestamp() int64

func GetStandarTime

func GetStandarTime(t time.Time) string

func GetStartDayOfWeek

func GetStartDayOfWeek() time.Time

func GetTodayBeginTime

func GetTodayBeginTime() time.Time

func GetUnixNano

func GetUnixNano(format, dateStr string) int64

func GetYesterdayTime

func GetYesterdayTime() time.Time

func ParseShanghaiTime

func ParseShanghaiTime(layout, value string) (time.Time, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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