utils

package
v0.0.0-...-8269def Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsOpen

func IsOpen(scheduleString string, day []int) bool

*

Function IsOpen testing schedule and return  true if function found some event in day
@var string scheduleString
@var []int day
@return bool

func StartInDay

func StartInDay(scheduleString string, day []int) bool

*

Function StartInDay testing schedule and return  true if function found event which start in day
@var string scheduleString
@var []int day
@return bool

Types

type Estruct

type Estruct struct {
	// contains filtered or unexported fields
}

type Event

type Event struct {
	Open  []int
	Close []int
}

func EventsInRange

func EventsInRange(scheduleString string, start []int, end []int) []Event

*

Function EventsInRange add to dateTime variable time
@var string scheduleString
@var []int start
@var []int end
@return []Event

type Recursion

type Recursion struct {
	Object map[string]Value
	Rules  []map[string]Value
}

type Rule

type Rule struct {
	Bhr      Value
	Hr       Value
	Wd       Value
	Timeline []Event
}

func GetRules

func GetRules(scheduleString string) []Rule

*

Function GetRules returns One of plain rules generated by schedule string
@var string scheduleString
@return []Rule

type Value

type Value struct {
	One  []int
	Many [][]int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL