Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HolidayUtil.Fix 方法增加新一年的日期,有问题 #19

Open
vvfan opened this issue Nov 5, 2024 · 2 comments
Open

HolidayUtil.Fix 方法增加新一年的日期,有问题 #19

vvfan opened this issue Nov 5, 2024 · 2 comments

Comments

@vvfan
Copy link

vvfan commented Nov 5, 2024

HolidayUtil.Fix 在看文档的时候说,是可以自行添加和修正数据的。

将2020-01-01修改为春节,并追加2099-01-01为元旦节

HolidayUtil.Fix(nil, "202001011120200101209901010120990101")
fmt.Println(HolidayUtil.GetHoliday("2020-01-01"))
fmt.Println(HolidayUtil.GetHoliday("2099-01-01"))

修正是可以的,但是 追加,试了一下不可以,
在 fix 内部,会调用
holiday := GetHoliday(day)
新增的数据,都是 nil, 新增数据无效果

@vvfan
Copy link
Author

vvfan commented Nov 5, 2024

已提 pr

@6tail
Copy link
Owner

6tail commented Nov 5, 2024

谢谢,已合并。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants