calendar

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsHoliday

func IsHoliday(date time.Time) (isHoliday bool)

This function requests isdayoff.ru service to determine if specified date is working day. Isdayoff returns 0 if requested day is working day and 1 if holiday. Detailed information about API is here: https://isdayoff.ru/desc/

Types

type TimeSet

type TimeSet map[time.Time]struct{}

func GetWorkingDays

func GetWorkingDays(start time.Time, stop time.Time) (TimeSet, error)

Get working days as map time.Time: bool. True value means that day in key is holiday.

func (TimeSet) Add

func (ts TimeSet) Add(element time.Time)

func (TimeSet) Remove

func (ts TimeSet) Remove(element time.Time)

Jump to

Keyboard shortcuts

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