Documentation
¶
Index ¶
- Constants
- func Transform(t Time, rule ...[]TransformRule) string
- type Time
- func Day(offset ...int) Time
- func DayHead(offset ...int) Time
- func DayTail(offset ...int) Time
- func Month(offset ...int) Time
- func MonthHead(offset ...int) Time
- func MonthTail(offset ...int) Time
- func Now() Time
- func Parse(layout string, value string) (Time, error)
- func Today() Time
- func Tomorrow() Time
- func Unix(sec int64, nsec ...int64) Time
- func UnixMicro(usec int64) Time
- func UnixMilli(msec int64) Time
- func UnixNano(nsec int64) Time
- func Week(offset ...int) Time
- func WeekHead(offset ...int) Time
- func WeekTail(offset ...int) Time
- func Yesterday() Time
- type TransformRule
Constants ¶
View Source
const ( Layout = time.Layout // The reference time, in numerical order. ANSIC = time.ANSIC UnixDate = time.UnixDate RubyDate = time.RubyDate RFC822 = time.RFC822 RFC822Z = time.RFC822Z RFC850 = time.RFC850 RFC1123 = time.RFC1123 RFC1123Z = time.RFC1123Z RFC3339 = time.RFC3339 RFC3339Nano = time.RFC3339Nano Kitchen = time.Kitchen Stamp = time.Stamp StampMilli = time.StampMilli StampMicro = time.StampMicro StampNano = time.StampNano DateTime = time.DateTime DateOnly = time.DateOnly TimeOnly = time.TimeOnly )
View Source
const ( TimeFormat = "H:i:s" DateFormat = "Y-m-d" DatetimeFormat = "Y-m-d H:i:s" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Time ¶ added in v2.1.1
type TransformRule ¶
Click to show internal directories.
Click to hide internal directories.