Documentation
¶
Overview ¶
Package dayofweek defines a representation of weekdays in a week
Index ¶
- type Dow
- func (me *Dow) AddDay(p Dow)
- func (me Dow) AddFriday()
- func (me Dow) AddMonday()
- func (me Dow) AddSaturday()
- func (me Dow) AddSunday()
- func (me Dow) AddThursday()
- func (me Dow) AddTuesday()
- func (me Dow) AddWednesday()
- func (me *Dow) Clear()
- func (me Dow) Equal(o Dow) bool
- func (me Dow) IsFriday() bool
- func (me Dow) IsMonday() bool
- func (me Dow) IsSaturday() bool
- func (me Dow) IsSet(p Dow) bool
- func (me Dow) IsSunday() bool
- func (me Dow) IsThursday() bool
- func (me Dow) IsTuesday() bool
- func (me Dow) IsWednesday() bool
- func (me Dow) IsWeekday(wd time.Weekday) bool
- func (me Dow) MarshalJSON() ([]byte, error)
- func (me Dow) OnDate(t time.Time) bool
- func (me *Dow) Parse(s string) error
- func (me *Dow) ParseRemove(s string) error
- func (me *Dow) RemoveDay(p Dow)
- func (me Dow) RemoveFriday()
- func (me Dow) RemoveMonday()
- func (me Dow) RemoveSaturday()
- func (me Dow) RemoveSunday()
- func (me Dow) RemoveThursday()
- func (me Dow) RemoveTuesday()
- func (me Dow) RemoveWednesday()
- func (me *Dow) Set(mon, tue, wed, thu, fri, sat, sun bool)
- func (me Dow) String() string
- func (me Dow) Today() bool
- func (me *Dow) UnmarshalJSON(d []byte) error
- func (me Dow) WeekdayToDow(wd time.Weekday) Dow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dow ¶
type Dow int
func (Dow) MarshalJSON ¶
Marshal function to dump output as a string eg {"Monday, Tuesday"}
func (*Dow) Parse ¶
Parse updates your Dow object from a given string such as (Mon, Tuesday, wed) Must be csv. Returns error if unable to parse a value.
func (*Dow) ParseRemove ¶
Parse a string of dow, and remove those days.
func (*Dow) UnmarshalJSON ¶
Unmarshal your JSON input into a Dow object. eg: {"run_on_days": "Mon, Tue, Thursday"}