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
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 (*TimeOnly) MarshalJSON ¶
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.