calendar

package module
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2017 License: MIT Imports: 2 Imported by: 0

README

calendar

Localizable calendar library

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func GetSupportedLocales

func GetSupportedLocales() []string

GetSupportedLocales returns all locales supported for calendar

Types

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

Jump to

Keyboard shortcuts

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