Documentation ¶
Index ¶
- Variables
- func Midnight(t time.Time) time.Time
- type DayTime
- func (dt DayTime) AsDuration() time.Duration
- func (dt DayTime) AsMinutes() int
- func (dt DayTime) At(t time.Time, loc *time.Location) time.Time
- func (dt DayTime) Equals(other DayTime) bool
- func (dr DayTime) MarshalJSON() ([]byte, error)
- func (dt DayTime) String() string
- func (dt DayTime) UnmarshalJSON(blob []byte) error
- type Range
- type TimeRange
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidFormat = errors.New("invalid format") ErrInvalidValue = errors.New("invalid value") )
Common error messages.
Functions ¶
Types ¶
type DayTime ¶
type DayTime [2]int
DayTime represents a HH:MM time during the day.
func ParseDayTime ¶
ParseDayTime parses a HH:MM time specification.
func (DayTime) AsDuration ¶
AsDuration returns dt as a duration from midnight (00:00).
func (DayTime) AsMinutes ¶
AsMinutes returns dt as a absolute number of minutes starting from midnight (00:00).
func (DayTime) MarshalJSON ¶
func (DayTime) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.