Documentation
¶
Index ¶
- Variables
- func Atod(s string, defs ...time.Duration) time.Duration
- func Parse(value string, layouts ...string) (tt time.Time, err error)
- func ParseInLocation(value string, loc *time.Location, layouts ...string) (tt time.Time, err error)
- func TruncateHours(t time.Time) time.Time
- func TruncateMinutes(t time.Time) time.Time
- func TruncateSeconds(t time.Time) time.Time
- type HHMM
- type MMSS
Constants ¶
This section is empty.
Variables ¶
View Source
var GeneralLayouts = []string{time.RFC3339, "2006-1-2 15:04:05", "2006-1-2", "15:04:05"}
Functions ¶
func Atod ¶ added in v1.0.17
Atod convert string to time.Duration. if not found or convert error, returns the defs[0] or zero.
func ParseInLocation ¶ added in v1.0.26
func TruncateHours ¶ added in v1.0.26
TruncateHours tuncate hours for time t. Returns the time (local: yyyy-MM-dd 00:00:00).
func TruncateMinutes ¶ added in v1.0.26
TruncateMinutes tuncate minute for time t. Returns the time (yyyy-MM-dd hh:00:00).
Types ¶
type HHMM ¶
type HHMM int
HHMM HH:MM (Minutes)
func (HHMM) MarshalJSON ¶
func (*HHMM) UnmarshalJSON ¶
type MMSS ¶
type MMSS int
MMSS MM:SS (Seconds)
func (MMSS) MarshalJSON ¶
func (*MMSS) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.