Documentation
¶
Index ¶
- type DateOnly
- func (d *DateOnly) Add(dur time.Duration) *DateOnly
- func (d *DateOnly) After(other *DateOnly) bool
- func (d *DateOnly) Before(other *DateOnly) bool
- func (d *DateOnly) EndOfDay() time.Time
- func (d *DateOnly) Equal(other *DateOnly) bool
- func (d *DateOnly) IsZero() bool
- func (d *DateOnly) MarshalJSON() ([]byte, error)
- func (d *DateOnly) Scan(value interface{}) error
- func (d *DateOnly) StartOfDay() time.Time
- func (d *DateOnly) String() string
- func (d *DateOnly) ToTime() time.Time
- func (d *DateOnly) UnmarshalJSON(b []byte) error
- func (d *DateOnly) Value() (driver.Value, error)
- type TimeOnly
- func (t *TimeOnly) After(other *TimeOnly) bool
- func (t *TimeOnly) Before(other *TimeOnly) bool
- func (t *TimeOnly) Equal(other *TimeOnly) bool
- func (t *TimeOnly) IsZero() bool
- func (t *TimeOnly) MarshalJSON() ([]byte, error)
- func (t *TimeOnly) Scan(value interface{}) error
- func (t *TimeOnly) String() string
- func (t *TimeOnly) UnmarshalJSON(b []byte) error
- func (t *TimeOnly) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DateOnly ¶
func NewDateOnly ¶ added in v2.10.0
NewDateOnly returns a DateOnly value normalized to midnight UTC.
func (*DateOnly) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface and will be called automatically
func (*DateOnly) StartOfDay ¶ added in v2.9.0
func (*DateOnly) UnmarshalJSON ¶
UnmarshalJSON implements the json.Marshaler interface and will be called automatically This method uses a pointer receiver because it modifies the internal state. Using a value receiver would only update a copy, leaving the original unchanged.
type TimeOnly ¶
func NewTimeOnly ¶ added in v2.13.0
func (*TimeOnly) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface and will be called automatically
func (*TimeOnly) UnmarshalJSON ¶
UnmarshalJSON implements the json.Marshaler interface and will be called automatically This method uses a pointer receiver because it modifies the internal state. Using a value receiver would only update a copy, leaving the original unchanged.