Documentation ¶
Overview ¶
Package date contains methods and structs to deal with timeless date
Index ¶
- Constants
- Variables
- type Date
- func (t *Date) Equal(u *Date) bool
- func (t *Date) IsAfter(u *Date) bool
- func (t *Date) IsBefore(u *Date) bool
- func (t Date) MarshalJSON() ([]byte, error)
- func (t *Date) Scan(value interface{}) error
- func (t *Date) ScanString(date string) error
- func (t Date) String() string
- func (t *Date) UnmarshalJSON(data []byte) (err error)
- func (t *Date) Value() (driver.Value, error)
Constants ¶
const DATE = "2006-01-02"
DATE is a time.Time layout for the a date (no time)
Variables ¶
var ErrMsgInvalidFormat = "invalid format"
ErrMsgInvalidFormat reprensents the error message returned when an invalid update format is provided
Functions ¶
This section is empty.
Types ¶
type Date ¶
Date represents a time.Time that uses DATE for json input/output instead of RFC3339
func (Date) MarshalJSON ¶
MarshalJSON returns a valid json representation of the struct https://golang.org/pkg/encoding/json/#Marshaler
func (*Date) Scan ¶
Scan assigns a value from a database driver https://golang.org/pkg/database/sql/#Scanner
func (*Date) ScanString ¶
ScanString implements the go-params Scanner interface
func (Date) String ¶
String implements the fmt.Stringer interface https://golang.org/pkg/fmt/#Stringer
func (*Date) UnmarshalJSON ¶
UnmarshalJSON tries to parse a json data into a valid struct https://golang.org/pkg/encoding/json/#Unmarshaler