HolidayUtil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

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

Functions

func Fix

func Fix(nms []string, dt string)

func GetHolidays

func GetHolidays(ymd string) *list.List

func GetHolidaysByTarget

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

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

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

func (*Holiday) GetDay

func (holiday *Holiday) GetDay() string

func (*Holiday) GetName

func (holiday *Holiday) GetName() string

func (*Holiday) GetTarget

func (holiday *Holiday) GetTarget() string

func (*Holiday) IsWork

func (holiday *Holiday) IsWork() bool

func (*Holiday) SetDay

func (holiday *Holiday) SetDay(day string)

func (*Holiday) SetName

func (holiday *Holiday) SetName(name string)

func (*Holiday) SetTarget

func (holiday *Holiday) SetTarget(target string)

func (*Holiday) SetWork

func (holiday *Holiday) SetWork(work bool)

func (*Holiday) String

func (holiday *Holiday) String() string

Jump to

Keyboard shortcuts

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