Documentation ¶
Index ¶
- Constants
- Variables
- func AddDay(t time.Time, day int) time.Time
- func AddHour(t time.Time, hour int) time.Time
- func AddMinutes(t time.Time, minutes int) time.Time
- func AddSeconds(t time.Time, seconds int) time.Time
- func Format(t time.Time) string
- func FormatBy(t time.Time, layout string) string
- func FormatUnix(sec int64) string
- func FormatUnixBy(sec int64, layout string) string
- func NowAddDay(day int) time.Time
- func NowAddHour(hour int) time.Time
- func NowAddMinutes(minutes int) time.Time
- func NowAddSeconds(seconds int) time.Time
- func NowUnix() int64
- func SetLocalByName(tzName string) error
- type TimeX
Constants ¶
Variables ¶
View Source
var (
// DefaultLayout template for format time
DefaultLayout = "2006-01-02 15:04:05"
)
Functions ¶
func AddMinutes ¶
AddMinutes add some minutes time for given time
func AddSeconds ¶
AddSeconds add some seconds time for given time
func FormatUnixBy ¶
FormatUnixBy format time seconds use given layout
func NowAddMinutes ¶
NowAddMinutes add some minutes time from now
func NowAddSeconds ¶
NowAddSeconds add some seconds time from now
Types ¶
type TimeX ¶
type TimeX struct { time.Time // DateLayout set the default date format layout. default use DefaultLayout DateLayout string }
TimeX struct
func (*TimeX) AddMinutes ¶
AddMinutes add some minutes time for the time
func (*TimeX) AddSeconds ¶
AddSeconds add some seconds time the time
Click to show internal directories.
Click to hide internal directories.