holidays

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package holidays supply holidays query.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Holiday

func Holiday(d time.Time) (bool, string, []string)

func IsHoliday deprecated

func IsHoliday(date time.Time) (bool, error)

IsHoliday checks given date is holiday or not.

Deprecated: Use Queryer.IsHoliday instead.

func IsWorkingday deprecated

func IsWorkingday(date time.Time) (bool, error)

IsWorkingday checks given date is working day or not.

Deprecated: Use Queryer.IsWorkingday instead.

Types

type Queryer

type Queryer interface {
	// IsHoliday checks given date is holiday or not.
	IsHoliday(date time.Time) (bool, error)

	// IsWorkingday checks given date is working day or not.
	IsWorkingday(date time.Time) (bool, error)

	Holiday(date time.Time) (bool, string, []string)
}

Queryer is the interface that wraps the Query method.

func BundleQueryer

func BundleQueryer() (Queryer, error)

BundleQueryer returns a bundle queryer.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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