Documentation
¶
Index ¶
- Constants
- func After(d time.Duration) <-chan time.Time
- func Duration(str string) time.Duration
- func Elapse(f func()) int64
- func GetCurentDateTimeStamp(time time.Time) int
- func GetCurrentStringTime() string
- func GetTimestampInMilli() int64
- func IsLeapYear(year int) bool
- func NewRashTimer(tick time.Duration) *rashTimer
- func Sleep(d time.Duration)
- func StringToDate(timeStr string) time.Time
- func StringToDateStamp(timeStr string) int64
- func StringToTime(timeStr string) time.Time
- func StringToTimeStamp(timeStr string) int64
- func Tick(d time.Duration) <-chan time.Time
- func TimeStampToStringOnlyDate(timestamp int64) string
- func TimeStampToStringOnlyTime(timestamp int64) string
- func TimeStampToStringTime(timestamp int64) string
- func TimeToStringDate(timeType time.Time) string
- func TimeToStringDateOblique(timeType time.Time) string
- func TimeToStringTime(timeType time.Time) string
- type Ticker
- type Time
- func (t *Time) BeginOfDay() *Time
- func (t *Time) BeginOfHour() *Time
- func (t *Time) BeginOfMinute() *Time
- func (t *Time) BeginOfMonth() *Time
- func (t *Time) BeginOfWeek() *Time
- func (t *Time) BeginOfYear() *Time
- func (t *Time) EndOfDay() *Time
- func (t *Time) EndOfHour() *Time
- func (t *Time) EndOfMinute() *Time
- func (t *Time) EndOfMonth() *Time
- func (t *Time) EndOfWeek() *Time
- func (t *Time) EndOfYear() *Time
- type Timer
Constants ¶
View Source
const ( GoTimeFormat = "2006-01-02 15:04:05" GoDateFormat = "2006-01-02" GoDateFormatOblique = "2006/01/02" GoHourMinuteSecondFormat = "15:04:05" )
*
- 时间处理类
Variables ¶
This section is empty.
Functions ¶
func GetCurentDateTimeStamp ¶
func NewRashTimer ¶
NewRashTimer is the time for a jiffies
func StringToTimeStamp ¶
*
- 把时间戳专程字符串类型的时间
- 输入时间为秒
- @param timeStr 2019-01-07 11:05:48
- @return 2019-01-07 11:05:48
func TimeStampToStringTime ¶
*
- 把时间戳专程字符串类型的时间
- 输入时间为秒
- @param timestamp 1546830348
- @return 2019-01-07 11:05:48
Types ¶
type Time ¶
Time time
func (*Time) BeginOfDay ¶
BeginOfDay returns zero point of time's day
func (*Time) BeginOfHour ¶
BeginOfHour returns zero point of time's day
func (*Time) BeginOfMinute ¶
BeginOfMinute returns zero point of time's day
func (*Time) BeginOfWeek ¶
BeginOfWeek the day of begin of week, NOTE: week begin from Sunday
func (*Time) BeginOfYear ¶
BeginOfYear BeginOfYear beginning of year
func (*Time) EndOfMinute ¶
EndOfMinute returns last point of time's day
Click to show internal directories.
Click to hide internal directories.