Documentation ¶
Index ¶
- Constants
- func FormatDate(t time.Time) string
- func FormatDateByTypes(t types.Time) string
- func FormatTime(t time.Time) string
- func FormatTimeByTypes(t types.Time) string
- func GetBeiJingTime() time.Time
- func GetDateInt(t types.Time) int
- func GetDateIntByTime(t time.Time) int
- func GetDateTimeLong(t types.Time) int64
- func GetDateTimeLongByTime(t time.Time) int64
- func GetDateTimeMillisecondStrByMillisecond(ms int64) string
- func GetDateTimeStrByMillisecond(ms int64) string
- func GetDateTimeStrBySecond(s int64) string
- func GetLastMonth1Date(t time.Time) time.Time
- func GetLastMonthDayCount(t time.Time) int64
- func GetLastMonthLastDate(t time.Time) time.Time
- func GetMillisecond(t time.Time) int64
- func GetMonthLastDay(t time.Time) time.Time
- func GetMonthStart(d time.Time) time.Time
- func GetNowMillisecond() int64
- func GetNowMonth1Date(t time.Time) time.Time
- func GetNowNanoSecond() int64
- func GetNowSecond() int64
- func GetTodayTimeQuantum() []time.Time
- func GetUnixTime(t types.Time) int64
- func GetWeeHours() string
- func GetWeekStart(d time.Time) time.Time
- func GetYesterdayDate() string
- func GetZeroTime(d time.Time) time.Time
- func Parse(str string) (time.Time, errors.AppError)
- func ParseByFormat(format, str string) (time.Time, errors.AppError)
- func ParseTime(str string) (types.Time, errors.AppError)
- func Sleep(second int64)
- func SleepMillisecond(millSecond int64)
Constants ¶
View Source
const ( // MinuteSecond 一分钟的秒数 MinuteSecond = 60 // HourSecond 一小时的秒数 HourSecond = MinuteSecond * 60 // DaySecond 一天的秒数 DaySecond = HourSecond * 24 )
Variables ¶
This section is empty.
Functions ¶
func FormatDate ¶
func FormatDateByTypes ¶
func FormatTime ¶
func FormatTimeByTypes ¶
func GetBeiJingTime ¶
func GetDateInt ¶
func GetDateIntByTime ¶
func GetDateTimeLong ¶
func GetDateTimeLongByTime ¶
func GetDateTimeStrBySecond ¶
func GetLastMonth1Date ¶
GetLastMonth1Date 获取时间上个月1号0时0分0秒时间
func GetLastMonthDayCount ¶
getLastMonthDayCount 获取时间上个月的天数
func GetLastMonthLastDate ¶
GetLastMonthLastDate 获取时间上个月的最后一天0时0分0秒时间
func GetMillisecond ¶
func GetMonthStart ¶
GetMonthStart 获取传入的时间所在月份的第一天,即某月第一天的0点。如传入time.Now(), 返回当前月份的第一天0点时间。
func GetNowMillisecond ¶
func GetNowMillisecond() int64
func GetNowMonth1Date ¶
GetLastMonth1Date 获取时间当月1号0时0分0秒时间
func GetNowNanoSecond ¶
func GetNowNanoSecond() int64
func GetNowSecond ¶
func GetNowSecond() int64
func GetTodayTimeQuantum ¶
获取当天时间段:2019-08-12 00:00:00 - 2019-08-12 23:59:59
func GetUnixTime ¶
func GetWeeHours ¶
func GetWeeHours() string
func SleepMillisecond ¶
func SleepMillisecond(millSecond int64)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.