calendar: zntr.io/calendar Index | Files

package calendar

import "zntr.io/calendar"

Index

Package Files

calendar.go default.go fr_Fr.go helpers.go locale.go

Variables

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

func GetSupportedLocales Uses

func GetSupportedLocales() []string

GetSupportedLocales returns all locales supported for calendar

type Calendar Uses

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

Calendar respresents default calendar contract

func New Uses

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

New calendar built using given locale

type WorkDayFunc Uses

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

WorkDayFunc is the function contract that implements the localised calendar

Package calendar imports 2 packages (graph). Updated 2020-06-30. Refresh now. Tools for package owners.