Documentation ¶
Index ¶
- Constants
- Variables
- func CheckTimeIsToday(t time.Time) bool
- func FormatDateTime(datestr string, srcFormat string, toFormat string) string
- func GetCalendarDayDiff(day_count int64) string
- func GetCalendarToday() string
- func GetDatePeriodString(dayCount int64) (string, string)
- func GetDateTime(format, dateStr string) time.Time
- func GetDateTimePeriodString(dayCount int64) (string, string)
- func GetDayBeginTime(day time.Time) time.Time
- func GetDayMiddleTime(t time.Time, cnt int) time.Time
- func GetFirstOfMonth() time.Time
- func GetFridayOfWeek(date string) string
- func GetLastDayOfMonth(date string) string
- func GetNDayAgo(cnt int, format string, srcDate string) string
- func GetNDayAgoTime(cnt int) time.Time
- func GetNMinuteAgo(cnt int) time.Time
- func GetNMonthTime(cnt int) time.Time
- func GetNWeeks(cnt int) []string
- func GetNextDayMiddle() int64
- func GetNextDayMiddleTime() time.Time
- func GetNowTimestamp() int64
- func GetStandarTime(t time.Time) string
- func GetStartDayOfWeek() time.Time
- func GetTodayBeginTime() time.Time
- func GetUnixNano(format, dateStr string) int64
- func GetYesterdayTime() time.Time
- func ParseShanghaiTime(layout, value string) (time.Time, error)
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 GetCalendarDayDiff ¶
func GetCalendarToday ¶
func GetCalendarToday() string
func GetDatePeriodString ¶
func GetDateTime ¶
func GetDateTimePeriodString ¶
func GetFridayOfWeek ¶
func GetLastDayOfMonth ¶
func GetNDayAgoTime ¶
func GetNMinuteAgo ¶
func GetNMonthTime ¶
func GetNextDayMiddle ¶
func GetNextDayMiddle() int64
func GetNextDayMiddleTime ¶
func GetNowTimestamp ¶
func GetNowTimestamp() int64
func GetStandarTime ¶
func GetStartDayOfWeek ¶
func GetTodayBeginTime ¶
func GetUnixNano ¶
func GetYesterdayTime ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.