Documentation ¶
Overview ¶
Package datetime contains methods and structs to deal with ISO8601 encoded UTC datetime
Index ¶
- Constants
- type DateTime
- func (t *DateTime) AddDate(years, months, days int) *DateTime
- func (t *DateTime) Equal(u *DateTime) bool
- func (t DateTime) MarshalJSON() ([]byte, error)
- func (t *DateTime) Scan(value interface{}) error
- func (t *DateTime) UnmarshalJSON(data []byte) error
- func (t *DateTime) Value() (driver.Value, error)
Constants ¶
View Source
const ISO8601 = "2006-01-02T15:04:05-0700"
ISO8601 is a time.Time layout for the ISO8601 format
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DateTime ¶
DateTime represents a time.Time that uses ISO8601 for json input/output instead of RFC3339
func (*DateTime) AddDate ¶
AddDate returns the time corresponding to adding the given number of years, months, and days to t.
func (DateTime) MarshalJSON ¶
MarshalJSON returns a valid json representation of the struct https://golang.org/pkg/encoding/json/#Marshaler
func (*DateTime) Scan ¶
Scan assigns a value from a database driver https://golang.org/pkg/database/sql/#Scanner
func (*DateTime) UnmarshalJSON ¶
UnmarshalJSON tries to parse a json data into a valid struct https://golang.org/pkg/encoding/json/#Unmarshaler
Click to show internal directories.
Click to hide internal directories.