Documentation ¶
Overview ¶
Package time contains a wrapper for time.Time in the standard library and associated methods. This package mainly exists to workaround an issue in Go where the serializer doesn't omit an empty value for time: https://github.com/golang/go/issues/11939. As such, this can be removed if a proposal is ever accepted for Go
Index ¶
- type Time
- func (t Time) Add(d time.Duration) Time
- func (t Time) AddDate(years int, months int, days int) Time
- func (t Time) After(u Time) bool
- func (t Time) Before(u Time) bool
- func (t Time) Equal(u Time) bool
- func (t Time) In(loc *time.Location) Time
- func (t Time) Local() Time
- func (t Time) MarshalJSON() ([]byte, error)
- func (t Time) Round(d time.Duration) Time
- func (t Time) Sub(u Time) time.Duration
- func (t Time) Truncate(d time.Duration) Time
- func (t Time) UTC() Time
- func (t *Time) UnmarshalJSON(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.