holiday

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Holiday

type Holiday struct {
	Date    string
	Color   string
	Message string
}

type Holidays

type Holidays []Holiday

func Load

func Load(lists []string) Holidays

func (Holidays) Match

func (hs Holidays) Match(t time.Time) (Holiday, bool)

Match attempts to match a given time with a holiday.

func (Holidays) Prefix

func (hs Holidays) Prefix(t time.Time, note string) string

Prefix a note if the holiday matches a given date.

Jump to

Keyboard shortcuts

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