Skip to content

Commit 6cd7ddb

Browse files
authored
v1.0.6 (#64)
* feat: make old new (#63) * fix: change ci hook (#65)
1 parent 716d532 commit 6cd7ddb

File tree

10 files changed

+102
-25
lines changed

10 files changed

+102
-25
lines changed

.github/workflows/default_branch_test.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,16 @@ name: Test
22

33
on:
44
push:
5-
branches: [ master, main ]
5+
branches: [ main ]
66

77
jobs:
8-
9-
build:
8+
test:
109
runs-on: ubuntu-latest
1110
steps:
12-
- uses: actions/checkout@v2
13-
11+
- uses: actions/checkout@v4
1412
- name: Set up Go
15-
uses: actions/setup-go@v2
13+
uses: actions/setup-go@v5
1614
with:
17-
go-version: 1.16
18-
15+
go-version: 1.22
1916
- name: Test
2017
run: make test
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
name: Pull Request CI
22

3-
on:
4-
pull_request:
5-
branches: [ master, v* ]
3+
on: pull_request
64

75
jobs:
8-
9-
build:
6+
ci:
107
runs-on: ubuntu-latest
118
steps:
12-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v4
1310

1411
- name: Set up Go
15-
uses: actions/setup-go@v2
12+
uses: actions/setup-go@v5
1613
with:
17-
go-version: 1.16
14+
go-version: 1.22
1815

1916
- name: Test
2017
run: make test
2118

2219
- name: golangci-lint
23-
uses: golangci/golangci-lint-action@v2
20+
uses: golangci/golangci-lint-action@v6
2421
with:
2522
version: latest

.github/workflows/scheduled_update_holidays.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414

1515
- name: Library Install
1616
run: sudo apt-get install nkf
1717

1818
- name: Set up Go
19-
uses: actions/setup-go@v2
19+
uses: actions/setup-go@v5
2020
with:
21-
go-version: 1.16
21+
go-version: 1.22
2222

2323
- name: Update Holiday
2424
run: make updateHolidays
2525

2626
- name: Create Pull Request
27-
uses: peter-evans/create-pull-request@v3
27+
uses: peter-evans/create-pull-request@v6
2828
with:
2929
commit-message: update holidays
3030
title: Update Holiday

.go-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.22.5

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 YutaKato
3+
Copyright (c) 2024 YutaKato
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# goholiday
22

3-
[![v1.0.5](https://img.shields.io/github/v/release/yut-kt/goholiday?logoColor=ff69b4&style=social)]()
3+
[![v1.0.6](https://img.shields.io/github/v/release/yut-kt/goholiday?logoColor=ff69b4&style=social)]()
44
[![Test](https://github.com/yut-kt/goholiday/actions/workflows/default_branch_test.yaml/badge.svg)](https://github.com/yut-kt/goholiday/actions/workflows/default_branch_test.yaml)
55
[![coverage](https://img.shields.io/badge/coverage-100%25-green.svg)]()
66
[![Go Report Card](https://goreportcard.com/badge/github.com/yut-kt/goholiday)](https://goreportcard.com/report/github.com/yut-kt/goholiday)
@@ -24,7 +24,7 @@ go version >= 1.16.15
2424

2525
## Usage
2626
- version >= v1.0.0
27-
- look at [example test file](https://github.com/yut-kt/goholiday/blob/master/goholiday_example_test.go) or [godoc example](https://godoc.org/github.com/yut-kt/goholiday)
27+
- look at [example test file](https://github.com/yut-kt/goholiday/blob/main/goholiday_example_test.go) or [godoc example](https://godoc.org/github.com/yut-kt/goholiday)
2828

2929
- version = v0.x.x (deprecated)
3030
- look at [docs/v0.md](docs/v0.md)

docs/bench/v1.0.6.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Score
2+
```
3+
$ go test -bench . -benchmem -count 5 -run none
4+
goos: darwin
5+
goarch: arm64
6+
pkg: github.com/yut-kt/goholiday
7+
BenchmarkNew-12 79984 13085 ns/op 42375 B/op 7 allocs/op
8+
BenchmarkNew-12 93198 13324 ns/op 42375 B/op 7 allocs/op
9+
BenchmarkNew-12 93420 13415 ns/op 42375 B/op 7 allocs/op
10+
BenchmarkNew-12 85468 13360 ns/op 42375 B/op 7 allocs/op
11+
BenchmarkNew-12 89742 13285 ns/op 42376 B/op 7 allocs/op
12+
BenchmarkGoholiday_IsNationalHoliday-12 42303 29020 ns/op 5856 B/op 366 allocs/op
13+
BenchmarkGoholiday_IsNationalHoliday-12 41546 28491 ns/op 5856 B/op 366 allocs/op
14+
BenchmarkGoholiday_IsNationalHoliday-12 41554 28864 ns/op 5856 B/op 366 allocs/op
15+
BenchmarkGoholiday_IsNationalHoliday-12 41583 28882 ns/op 5856 B/op 366 allocs/op
16+
BenchmarkGoholiday_IsNationalHoliday-12 41703 28985 ns/op 5856 B/op 366 allocs/op
17+
BenchmarkGoholiday_IsHoliday-12 30775 39136 ns/op 8128 B/op 508 allocs/op
18+
BenchmarkGoholiday_IsHoliday-12 30190 39374 ns/op 8128 B/op 508 allocs/op
19+
BenchmarkGoholiday_IsHoliday-12 30613 39318 ns/op 8128 B/op 508 allocs/op
20+
BenchmarkGoholiday_IsHoliday-12 30726 40038 ns/op 8128 B/op 508 allocs/op
21+
BenchmarkGoholiday_IsHoliday-12 30562 40115 ns/op 8128 B/op 508 allocs/op
22+
BenchmarkGoholiday_IsBusinessDay-12 29947 39978 ns/op 8128 B/op 508 allocs/op
23+
BenchmarkGoholiday_IsBusinessDay-12 30261 39579 ns/op 8128 B/op 508 allocs/op
24+
BenchmarkGoholiday_IsBusinessDay-12 30164 39439 ns/op 8128 B/op 508 allocs/op
25+
BenchmarkGoholiday_IsBusinessDay-12 29936 40088 ns/op 8128 B/op 508 allocs/op
26+
BenchmarkGoholiday_IsBusinessDay-12 29887 39679 ns/op 8128 B/op 508 allocs/op
27+
BenchmarkGoholiday_SetUniqueHolidays-12 41427 28403 ns/op 5856 B/op 366 allocs/op
28+
BenchmarkGoholiday_SetUniqueHolidays-12 41937 29126 ns/op 5856 B/op 366 allocs/op
29+
BenchmarkGoholiday_SetUniqueHolidays-12 41332 28998 ns/op 5856 B/op 366 allocs/op
30+
BenchmarkGoholiday_SetUniqueHolidays-12 42133 28862 ns/op 5856 B/op 366 allocs/op
31+
BenchmarkGoholiday_SetUniqueHolidays-12 41314 29365 ns/op 5856 B/op 366 allocs/op
32+
BenchmarkGoholiday_BusinessDaysAfter-12 19584 61063 ns/op 12048 B/op 753 allocs/op
33+
BenchmarkGoholiday_BusinessDaysAfter-12 19690 61339 ns/op 12048 B/op 753 allocs/op
34+
BenchmarkGoholiday_BusinessDaysAfter-12 19684 61210 ns/op 12048 B/op 753 allocs/op
35+
BenchmarkGoholiday_BusinessDaysAfter-12 19171 61532 ns/op 12048 B/op 753 allocs/op
36+
BenchmarkGoholiday_BusinessDaysAfter-12 19692 60958 ns/op 12048 B/op 753 allocs/op
37+
BenchmarkGoholiday_BusinessDaysBefore-12 19203 61553 ns/op 12048 B/op 753 allocs/op
38+
BenchmarkGoholiday_BusinessDaysBefore-12 19454 62000 ns/op 12048 B/op 753 allocs/op
39+
BenchmarkGoholiday_BusinessDaysBefore-12 19081 62520 ns/op 12048 B/op 753 allocs/op
40+
BenchmarkGoholiday_BusinessDaysBefore-12 19138 62519 ns/op 12048 B/op 753 allocs/op
41+
BenchmarkGoholiday_BusinessDaysBefore-12 19383 62537 ns/op 12048 B/op 753 allocs/op
42+
PASS
43+
ok github.com/yut-kt/goholiday 56.333s
44+
```

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/yut-kt/goholiday
22

3-
go 1.16
3+
go 1.22

nholidays/jp/national_holidays.csv

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,3 +1012,22 @@
10121012
2024/11/3,文化の日
10131013
2024/11/4,休日
10141014
2024/11/23,勤労感謝の日
1015+
2025/1/1,元日
1016+
2025/1/13,成人の日
1017+
2025/2/11,建国記念の日
1018+
2025/2/23,天皇誕生日
1019+
2025/2/24,休日
1020+
2025/3/20,春分の日
1021+
2025/4/29,昭和の日
1022+
2025/5/3,憲法記念日
1023+
2025/5/4,みどりの日
1024+
2025/5/5,こどもの日
1025+
2025/5/6,休日
1026+
2025/7/21,海の日
1027+
2025/8/11,山の日
1028+
2025/9/15,敬老の日
1029+
2025/9/23,秋分の日
1030+
2025/10/13,スポーツの日
1031+
2025/11/3,文化の日
1032+
2025/11/23,勤労感謝の日
1033+
2025/11/24,休日

nholidays/jp/schedule.go

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)