Documentation
¶
Index ¶
- func Date(t time.Time, layout string) string
- func Days(d time.Duration) float64
- func EndOfDay(t time.Time) time.Time
- func EndOfMonth(t time.Time) time.Time
- func EndOfWeek(date time.Time, weekStartDay ...time.Weekday) time.Time
- func EndOfYear(t time.Time) time.Time
- func IsLeapYear(year int) bool
- func MSleep(t int64)
- func Microsecond(tm time.Time) int64
- func Millisecond(tm time.Time) int64
- func MonthDays(year int, month time.Month) int
- func MonthDays2(t time.Time) int
- func Now(layout string) string
- func Parse(value string) time.Time
- func ParseLocation(value string) time.Time
- func ServiceElapseTime() time.Duration
- func ServiceStartupTime() time.Time
- func ServiceUptime() int64
- func Sleep(t int64)
- func StartOfDay(t time.Time) time.Time
- func StartOfMonth(t time.Time) time.Time
- func StartOfWeek(date time.Time, weekStartDay ...time.Weekday) time.Time
- func StartOfYear(t time.Time) time.Time
- func Time(msec int64) time.Time
- func USleep(t int64)
- func Valid(year, month, day int) bool
- func YearDays(year int) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MSleep ¶
func MSleep(t int64)
MSleep pauses the current goroutine for at least the millisecond d. A negative or zero duration causes Sleep to return immediately.
func Sleep ¶
func Sleep(t int64)
Sleep pauses the current goroutine for at least the second d. A negative or zero duration causes Sleep to return immediately.
func StartOfWeek ¶
StartOfWeek 获取日期中当周的开始时间; weekStartDay 周几作为周的第一天,本库默认周一.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.