timetable

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: GPL-3.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TimeParseError = errors.New("failed to parse time")

Functions

This section is empty.

Types

type Date

type Date struct {
	Day, Month, Year int
}

func DateFromString

func DateFromString(raw string) (date *Date, err error)

type Event

type Event struct {
	Date
	Begin, End Time
	Text       []string
}

func EventFromElement

func EventFromElement(date Date, e htmltable.DimensionalField) (event Event, id string, err error)

type Time

type Time struct {
	Hours, Minutes int
}

func TimeFromString

func TimeFromString(raw string) (time Time, err error)

func (Time) ToTime

func (t Time) ToTime(date Date, timezone *time.Location) time.Time

type TimeTable

type TimeTable struct {
	Events map[string]Event
	// contains filtered or unexported fields
}

func ParseTimeTable

func ParseTimeTable(dom *goquery.Selection) (tt *TimeTable, err error)

Jump to

Keyboard shortcuts

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