Documentation
¶
Index ¶
- Constants
- type Duration
- func (Duration) Abs() Duration
- func (Duration) Hours() float64
- func (Duration) Microseconds() int64
- func (Duration) Milliseconds() int64
- func (Duration) Minutes() float64
- func (Duration) Nanoseconds() int64
- func (Duration) Round(m Duration) Duration
- func (Duration) Seconds() float64
- func (Duration) String() string
- func (Duration) Truncate(m Duration) Duration
- type Location
- type Month
- type ParseError
- type Time
- func Date(year int, month Month, day int, hour int, min int, sec int, nsec int, ...) Time
- func Now() Time
- func Parse(layout string, value string) (Time, error)
- func ParseInLocation(layout string, value string, loc *Location) (Time, error)
- func Unix(sec int64, nsec int64) Time
- func UnixMicro(usec int64) Time
- func UnixMilli(msec int64) Time
- func (Time) Add(d Duration) Time
- func (Time) AddDate(years int, months int, days int) Time
- func (Time) AppendBinary(b []byte) ([]byte, error)
- func (Time) AppendFormat(b []byte, layout string) []byte
- func (Time) AppendText(b []byte) ([]byte, error)
- func (Time) Clock() (hour int, min int, sec int)
- func (Time) Compare(u Time) int
- func (Time) Date() (year int, month Month, day int)
- func (Time) Day() int
- func (Time) GoString() string
- func (Time) GobEncode() ([]byte, error)
- func (Time) Hour() int
- func (Time) ISOWeek() (year int, week int)
- func (Time) In(loc *Location) Time
- func (Time) IsDST() bool
- func (Time) Local() Time
- func (Time) Location() *Location
- func (Time) MarshalBinary() ([]byte, error)
- func (Time) MarshalJSON() ([]byte, error)
- func (Time) MarshalText() ([]byte, error)
- func (Time) Minute() int
- func (Time) Month() Month
- func (Time) Nanosecond() int
- func (Time) Round(d Duration) Time
- func (Time) Second() int
- func (Time) String() string
- func (Time) Sub(u Time) Duration
- func (Time) Truncate(d Duration) Time
- func (Time) UTC() Time
- func (Time) Weekday() Weekday
- func (Time) Year() int
- func (Time) YearDay() int
- func (Time) Zone() (name string, offset int)
- func (Time) ZoneBounds() (start Time, end Time)
- type Weekday
Constants ¶
View Source
const ANSIC = "Mon Jan _2 15:04:05 2006"
View Source
const DateOnly = "2006-01-02"
View Source
const DateTime = "2006-01-02 15:04:05"
View Source
const Kitchen = "3:04PM"
View Source
const Layout = "01/02 03:04:05PM '06 -0700"
View Source
const RFC1123 = "Mon, 02 Jan 2006 15:04:05 MST"
View Source
const RFC1123Z = "Mon, 02 Jan 2006 15:04:05 -0700"
View Source
const RFC822 = "02 Jan 06 15:04 MST"
View Source
const RFC822Z = "02 Jan 06 15:04 -0700"
View Source
const RFC850 = "Monday, 02-Jan-06 15:04:05 MST"
View Source
const RubyDate = "Mon Jan 02 15:04:05 -0700 2006"
View Source
const Stamp = "Jan _2 15:04:05"
View Source
const StampMicro = "Jan _2 15:04:05.000000"
View Source
const StampMilli = "Jan _2 15:04:05.000"
View Source
const StampNano = "Jan _2 15:04:05.000000000"
View Source
const TimeOnly = "15:04:05"
View Source
const UnixDate = "Mon Jan _2 15:04:05 MST 2006"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Duration ¶
type Duration int64
const Hour Duration = 3600000000000
const Microsecond Duration = 1000
const Millisecond Duration = 1000000
const Minute Duration = 60000000000
const Nanosecond Duration = 1
const Second Duration = 1000000000
func ParseDuration ¶
func (Duration) Microseconds ¶
func (Duration) Milliseconds ¶
func (Duration) Nanoseconds ¶
type Location ¶
type Location struct {
// contains filtered or unexported fields
}
var UTC *Location
func LoadLocationFromTZData ¶
type Month ¶
type Month int
const April Month = 4
const August Month = 8
const December Month = 12
const February Month = 2
const January Month = 1
const July Month = 7
const June Month = 6
const March Month = 3
const May Month = 5
const November Month = 11
const October Month = 10
const September Month = 9
type ParseError ¶
type ParseError struct {
Layout string
Value string
LayoutElem string
ValueElem string
Message string
}
func (*ParseError) Error ¶
func (*ParseError) Error() string
type Time ¶
type Time struct {
// contains filtered or unexported fields
}
func ParseInLocation ¶
func (Time) MarshalBinary ¶
func (Time) MarshalJSON ¶
func (Time) MarshalText ¶
func (Time) Nanosecond ¶
func (Time) ZoneBounds ¶
Click to show internal directories.
Click to hide internal directories.