timeframe

package
v0.0.0-...-fadd068 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Date

func Date(year, month, day int) time.Time

func FirstDayOfWeek

func FirstDayOfWeek(d time.Time) time.Time

func LastDayOfWeek

func LastDayOfWeek(d time.Time) time.Time

func SameDay

func SameDay(date1, date2 time.Time) bool

Types

type Day

type Day struct {
	Date    time.Time
	Weekday string
	Events  []*Event
}

type Event

type Event struct {
	From        string
	Until       string
	Description string
}

type TimeFrame

type TimeFrame struct {
	Days map[string]*Day
	// contains filtered or unexported fields
}

func NewTimeFrame

func NewTimeFrame(from, until time.Time) TimeFrame

func (*TimeFrame) FillFrame

func (t *TimeFrame) FillFrame(env *object.Environment)

Jump to

Keyboard shortcuts

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