HolidayUtil

package
v1.3.15 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 3 Imported by: 5

Documentation

Overview

Package HolidayUtil @Title HolidayUtil @Description 法定节假日工具(自2001年12月29日起) @Author 6tail

Index

Constants

This section is empty.

Variables

View Source
var NAMES = []string{"元旦节", "春节", "清明节", "劳动节", "端午节", "中秋节", "国庆节", "国庆中秋", "抗战胜利日"}

Functions

func Fix added in v1.0.18

func Fix(nms []string, dt string)

func GetHolidays

func GetHolidays(ymd string) *list.List

func GetHolidaysByTarget added in v1.0.18

func GetHolidaysByTarget(ymd string) *list.List

func GetHolidaysByTargetYmd

func GetHolidaysByTargetYmd(year int, month int, day int) *list.List

func GetHolidaysByYear

func GetHolidaysByYear(year int) *list.List

func GetHolidaysByYm

func GetHolidaysByYm(year int, month int) *list.List

Types

type Holiday added in v1.3.1

type Holiday struct {
	// contains filtered or unexported fields
}

Holiday 节假日

func GetHoliday

func GetHoliday(ymd string) *Holiday

func GetHolidayByYmd

func GetHolidayByYmd(year int, month int, day int) *Holiday

func NewHoliday added in v1.3.1

func NewHoliday(day string, name string, work bool, target string) *Holiday

func (*Holiday) GetDay added in v1.3.1

func (holiday *Holiday) GetDay() string

func (*Holiday) GetName added in v1.3.1

func (holiday *Holiday) GetName() string

func (*Holiday) GetTarget added in v1.3.1

func (holiday *Holiday) GetTarget() string

func (*Holiday) IsWork added in v1.3.1

func (holiday *Holiday) IsWork() bool

func (*Holiday) SetDay added in v1.3.1

func (holiday *Holiday) SetDay(day string)

func (*Holiday) SetName added in v1.3.1

func (holiday *Holiday) SetName(name string)

func (*Holiday) SetTarget added in v1.3.1

func (holiday *Holiday) SetTarget(target string)

func (*Holiday) SetWork added in v1.3.1

func (holiday *Holiday) SetWork(work bool)

func (*Holiday) String added in v1.3.1

func (holiday *Holiday) String() string

Jump to

Keyboard shortcuts

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