Documentation
¶
Index ¶
- type NullDate
- func (d NullDate) GormDataType() string
- func (d NullDate) IsZero() bool
- func (d NullDate) MarshalJSON() ([]byte, error)
- func (d *NullDate) Scan(value interface{}) (err error)
- func (d *NullDate) SetValid(t time.Time)
- func (d NullDate) String() string
- func (d NullDate) ToTime() time.Time
- func (d *NullDate) UnmarshalJSON(bs []byte) error
- func (d NullDate) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NullDate ¶
NullDate is the nullable type for Date only. Support UTC timezone only Null if valid is true
func MustParse ¶
MustParse creates a new Date from the RFC3339 Date - "2006-01-02" Panic if wrong format
func NewFromPtr ¶
NewFromPtr creates a Date that be null if t is nil
func NewFromStr ¶
NewFromStr creates a new Date from the RFC3339 Date - "2006-01-02"
func (NullDate) GormDataType ¶
GormDataType gorm common data type
func (NullDate) MarshalJSON ¶
MarshalJSON marshal to the JSON
func (NullDate) String ¶
Strong converts the Date to string as RFC3339 format It will be empty string if the Date is null
func (*NullDate) UnmarshalJSON ¶
UnmarshalJSON to parse the JSON
Click to show internal directories.
Click to hide internal directories.