Documentation
¶
Index ¶
- Constants
- Variables
- func ParseInt(t any) (i int64, err error)
- type MilliTimestamp
- type NanoTimestamp
- type Time
- func (t *Time) Add(x any) error
- func (t Time) Format(format ...string) string
- func (t Time) IsZero() bool
- func (t *Time) Now()
- func (t *Time) Set(x any, mode ...string) error
- func (t Time) String() string
- func (t Time) Time() time.Time
- func (t Time) Unix() int64
- func (t Time) UnixMilli() int64
- func (t Time) UnixNano() int64
- type UnixTimestamp
Constants ¶
View Source
const DefaultFormat string = "%Y-%m-%d %H:%M:%S"
View Source
const (
ModeFormat string = "format"
)
Variables ¶
View Source
var CN = time.FixedZone("CST", 8*3600)
View Source
var ErrModeFormat = errorf.New("intime: ModeFormat error: %v")
View Source
var ErrParseInt = errorf.New("intime: ParseInt of unknown type: %v")
Functions ¶
Types ¶
type MilliTimestamp ¶
type MilliTimestamp interface {
UnixMilli() int64
}
type NanoTimestamp ¶
type NanoTimestamp interface {
UnixNano() int64
}
type UnixTimestamp ¶
type UnixTimestamp interface {
Unix() int64
}
Click to show internal directories.
Click to hide internal directories.