Documentation ¶
Overview ¶
Package schedule provides types for scheduling.
Index ¶
- type Weekly
- func (w *Weekly) Clone() (c *Weekly)
- func (w *Weekly) Contains(t time.Time) (ok bool)
- func (w *Weekly) MarshalJSON() (data []byte, err error)
- func (w *Weekly) MarshalYAML() (v any, err error)
- func (w *Weekly) UnmarshalJSON(data []byte) (err error)
- func (w *Weekly) UnmarshalYAML(value *yaml.Node) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Weekly ¶
type Weekly struct {
// contains filtered or unexported fields
}
Weekly is a schedule for one week. Each day of the week has one range with a beginning and an end.
func EmptyWeekly ¶
func EmptyWeekly() (w *Weekly)
EmptyWeekly creates empty weekly schedule with local time zone.
func FullWeekly ¶
func FullWeekly() (w *Weekly)
FullWeekly creates full weekly schedule with local time zone.
TODO(s.chzhen): Consider moving into tests.
func (*Weekly) Contains ¶
Contains returns true if t is within the corresponding day range of the schedule in the schedule's time zone.
func (*Weekly) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for *Weekly.
func (*Weekly) MarshalYAML ¶
MarshalYAML implements the yaml.Marshaler interface for *Weekly.
func (*Weekly) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for *Weekly.
func (*Weekly) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface for *Weekly.