holiday

package
v0.0.0-...-958fc9f Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Date

type Date struct {
	Year  int
	Month time.Month
	Day   int
}

Date represents a date.

func (Date) String

func (d Date) String() string

type Holiday

type Holiday struct {
	Date string
	Name string
}

func FindHoliday

func FindHoliday(year int, month time.Month, day int) (Holiday, bool)

FindHoliday returns whether the specific day is a holiday.

func FindHolidaysInMonth

func FindHolidaysInMonth(year int, month time.Month) []Holiday

FindHolidaysInMonth returns holidays in the month.

func FindHolidaysInRange

func FindHolidaysInRange(from, to Date) []Holiday

func FindHolidaysInYear

func FindHolidaysInYear(year int) []Holiday

FindHolidaysInYear returns holidays in the year.

Jump to

Keyboard shortcuts

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