spec

package
v0.0.0-...-9fcd5ef Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(specification string, yearMode bool) error

Types

type Specification

type Specification struct {
	Occurrences set.Interface
	DaysOfWeek  set.Interface
}

Specification contains occurrence information.

func New

func New(specification string) (*Specification, error)

New creates a new occurrence data instance.

func NewFromDate

func NewFromDate(date time.Time, yearMode bool) *Specification

NewFromDate creates a new occurrence data instance from the provided date.

func (Specification) FriendlyStrings

func (t Specification) FriendlyStrings(yearMode bool) (results []string)

FriendlyStrings provides more human-readable output about a Specification.

func (Specification) Intersects

func (t Specification) Intersects(other *Specification) bool

Intersects returns true if the other Data instance intersects this instance.

func (Specification) String

func (t Specification) String() string

String returns a string representation of the Occurrences structure.

Jump to

Keyboard shortcuts

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