events

package
Version: v0.0.0-...-386235d Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BirthdayEvent

type BirthdayEvent struct {
	Event
	// contains filtered or unexported fields
}

func NewBirthday

func NewBirthday(date time.Time, text string) BirthdayEvent

func (*BirthdayEvent) Birthday

func (b *BirthdayEvent) Birthday() time.Time

func (*BirthdayEvent) BirthdayAfter

func (b *BirthdayEvent) BirthdayAfter(now time.Time) time.Time

func (*BirthdayEvent) Next

func (b *BirthdayEvent) Next() BirthdayEvent

func (*BirthdayEvent) NextAfter

func (b *BirthdayEvent) NextAfter(now time.Time) BirthdayEvent

func (*BirthdayEvent) NextBirthday

func (b *BirthdayEvent) NextBirthday() time.Time

func (*BirthdayEvent) String

func (b *BirthdayEvent) String() string

type Birthdays

type Birthdays []BirthdayEvent

func (*Birthdays) After

func (bs *Birthdays) After(ref time.Time) Birthdays

func (*Birthdays) Before

func (bs *Birthdays) Before(ref time.Time) Birthdays

func (Birthdays) Len

func (bs Birthdays) Len() int

Len is part of sort.Interface.

func (Birthdays) Less

func (bs Birthdays) Less(i, j int) bool

Less is part of sort.Interface.

func (*Birthdays) NextBirthdays

func (bs *Birthdays) NextBirthdays() Birthdays

func (*Birthdays) NextBirthdaysAfter

func (bs *Birthdays) NextBirthdaysAfter(ref time.Time) Birthdays

func (*Birthdays) String

func (bs *Birthdays) String() string

func (Birthdays) Swap

func (bs Birthdays) Swap(i, j int)

Swap is part of sort.Interface.

type Event

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

func New

func New(time time.Time, text string) Event

func (*Event) Date

func (e *Event) Date() (int, time.Month, int)

func (*Event) DaysBetween

func (e *Event) DaysBetween(ref time.Time) float64

func (*Event) DaysFromNow

func (e *Event) DaysFromNow() float64

func (*Event) String

func (e *Event) String() string

func (*Event) Text

func (e *Event) Text() string

func (*Event) Time

func (e *Event) Time() time.Time

func (*Event) TimeEqual

func (e *Event) TimeEqual(ref time.Time) bool

type Eventable

type Eventable interface {
	Text() string
	Time() time.Time
	Date() (int, time.Month, int)
	DaysBetween(ref time.Time) float64

	String() string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL