Back to

package calendar

Latest Go to latest
Published: May 23, 2017 | License: MIT | Module:


Package Files


var (
	// ErrLocaleNotFound is raised when the locale is not supported
	ErrLocaleNotFound = errors.New("calendar: given locale not found")

func GetSupportedLocales

func GetSupportedLocales() []string

GetSupportedLocales returns all locales supported for calendar

type Calendar

type Calendar interface {
	IsWorkingDay(time.Time) (bool, bool, string)

Calendar respresents default calendar contract

func New

func New(name string, year int) (Calendar, error)

New calendar built using given locale

type WorkDayFunc

type WorkDayFunc func(time.Time) (bool, bool, string)

WorkDayFunc is the function contract that implements the localised calendar

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier