calendar

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultLimit = 3 * 24 * time.Hour
View Source
const DefaultTimezone = "Local"

Variables

This section is empty.

Functions

This section is empty.

Types

type Calendar

type Calendar interface {
	Events(ctx context.Context, limit time.Duration) ([]Event, error)
}

type Event

type Event struct {
	ID      int
	Summary string
	Start   time.Time
	End     time.Time
}

func (*Event) IsSame

func (e *Event) IsSame(other Event) bool

func (*Event) IsZero

func (e *Event) IsZero() bool

type ICal

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

func NewICal

func NewICal(source string, opts ...Option) (*ICal, error)

func (*ICal) Events

func (c *ICal) Events(ctx context.Context, limit time.Duration) ([]Event, error)

type Option

type Option func(c *ICal) error

func WithTimeZone

func WithTimeZone(tz string) Option

type TimeBound added in v0.9.2

type TimeBound struct {
	Start time.Time
	End   time.Time
}

Jump to

Keyboard shortcuts

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