Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EveryDay = []string{"su", "mo", "tu", "we", "th", "fr", "sa"}
EveryDay Constant to say that all days are valid
Functions ¶
This section is empty.
Types ¶
type TimeWindow ¶
type TimeWindow struct {
// contains filtered or unexported fields
}
TimeWindow specifies a schedule of days and times.
func New ¶
func New(days []string, startTime, endTime, location string) (*TimeWindow, error)
New creates a TimeWindow instance based on string inputs specifying a schedule.
func (*TimeWindow) Contains ¶
func (tw *TimeWindow) Contains(t time.Time) bool
Contains determines whether the specified time is within this time window.
func (*TimeWindow) String ¶
func (tw *TimeWindow) String() string
String returns a string representation of this time window.
Click to show internal directories.
Click to hide internal directories.