holiday_japan 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +106 -96
- data/README.md.erb +123 -0
- data/Rakefile +4 -0
- data/lib/holiday_japan.rb +2 -2
- data/test/holiday.csv +18 -0
- data/test/holiday_japan_test.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff5b05052915590e2ce0e47e5850dbb591763607afd0654edc992b209a689248
|
4
|
+
data.tar.gz: 0b37dc4a6c7238ec21ba7c9d6b8786abece7b124f4fe05adb8c7994cc6e9dcb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b60f539c53afb041807e92b3ad624ca2c9fc06f2c758b95adda7072df60f8cefb3c158c8ba86fad0c520c620b5409b654ccc1cbb81ca0d7d232ddb6328cfb02
|
7
|
+
data.tar.gz: 45a4d2ea31afbcae07875799f712e595e0535b3d56889cd43c79c39973ed9a2bffad0daeafdb726dee0d647de712fed0f7abb8d25dc753a69eadf6ed1cd1631b
|
data/README.md
CHANGED
@@ -35,140 +35,150 @@
|
|
35
35
|
* `check(date)` ― Dateクラスのオブジェクトによる祝日判定
|
36
36
|
|
37
37
|
```ruby
|
38
|
-
HolidayJapan.check(Date.new(
|
38
|
+
HolidayJapan.check(Date.new(2019,3,21))
|
39
39
|
=> true
|
40
40
|
```
|
41
41
|
|
42
42
|
* `name(date)` ― 日付が祝日の場合は祝日名を返し、祝日でなければ nil を返す。
|
43
43
|
|
44
44
|
```ruby
|
45
|
-
HolidayJapan.name(Date.new(
|
45
|
+
HolidayJapan.name(Date.new(2019,3,21))
|
46
46
|
=> "春分の日"
|
47
47
|
```
|
48
48
|
|
49
49
|
* `print_year(year)` ― ある年の祝日一覧をプリント
|
50
50
|
|
51
51
|
```
|
52
|
-
$ ruby -r holiday_japan -e 'HolidayJapan.print_year
|
53
|
-
listing year
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
52
|
+
$ ruby -r holiday_japan -e 'HolidayJapan.print_year 2019'
|
53
|
+
listing year 2019...
|
54
|
+
2019-01-01 Tue 元日
|
55
|
+
2019-01-14 Mon 成人の日
|
56
|
+
2019-02-11 Mon 建国記念の日
|
57
|
+
2019-03-21 Thu 春分の日
|
58
|
+
2019-04-29 Mon 昭和の日
|
59
|
+
2019-04-30 Tue 国民の休日
|
60
|
+
2019-05-01 Wed 即位の日(名称未定)
|
61
|
+
2019-05-02 Thu 国民の休日
|
62
|
+
2019-05-03 Fri 憲法記念日
|
63
|
+
2019-05-04 Sat みどりの日
|
64
|
+
2019-05-05 Sun こどもの日
|
65
|
+
2019-05-06 Mon 振替休日
|
66
|
+
2019-07-15 Mon 海の日
|
67
|
+
2019-08-11 Sun 山の日
|
68
|
+
2019-08-12 Mon 振替休日
|
69
|
+
2019-09-16 Mon 敬老の日
|
70
|
+
2019-09-23 Mon 秋分の日
|
71
|
+
2019-10-14 Mon 体育の日
|
72
|
+
2019-10-22 Tue 即位礼正殿の儀
|
73
|
+
2019-11-03 Sun 文化の日
|
74
|
+
2019-11-04 Mon 振替休日
|
75
|
+
2019-11-23 Sat 勤労感謝の日
|
74
76
|
```
|
75
77
|
|
76
78
|
* `list_year(year)` ― ある年について、 [日付, 祝日名] のArrayを返す
|
77
79
|
|
78
80
|
```ruby
|
79
|
-
HolidayJapan.list_year(
|
80
|
-
=> [[#<Date:
|
81
|
-
[#<Date:
|
82
|
-
[#<Date:
|
83
|
-
[#<Date:
|
84
|
-
[#<Date:
|
85
|
-
[#<Date:
|
86
|
-
[#<Date:
|
87
|
-
[#<Date:
|
88
|
-
[#<Date:
|
89
|
-
[#<Date:
|
90
|
-
[#<Date:
|
91
|
-
[#<Date:
|
92
|
-
[#<Date:
|
93
|
-
[#<Date:
|
94
|
-
[#<Date:
|
95
|
-
[#<Date:
|
96
|
-
[#<Date:
|
97
|
-
[#<Date:
|
98
|
-
[#<Date:
|
99
|
-
[#<Date:
|
81
|
+
HolidayJapan.list_year(2019)
|
82
|
+
=> [[#<Date: 2019-01-01 ((2458485j,0s,0n),+0s,2299161j)>, "元日"],
|
83
|
+
[#<Date: 2019-01-14 ((2458498j,0s,0n),+0s,2299161j)>, "成人の日"],
|
84
|
+
[#<Date: 2019-02-11 ((2458526j,0s,0n),+0s,2299161j)>, "建国記念の日"],
|
85
|
+
[#<Date: 2019-03-21 ((2458564j,0s,0n),+0s,2299161j)>, "春分の日"],
|
86
|
+
[#<Date: 2019-04-29 ((2458603j,0s,0n),+0s,2299161j)>, "昭和の日"],
|
87
|
+
[#<Date: 2019-04-30 ((2458604j,0s,0n),+0s,2299161j)>, "国民の休日"],
|
88
|
+
[#<Date: 2019-05-01 ((2458605j,0s,0n),+0s,2299161j)>, "即位の日(名称未定)"],
|
89
|
+
[#<Date: 2019-05-02 ((2458606j,0s,0n),+0s,2299161j)>, "国民の休日"],
|
90
|
+
[#<Date: 2019-05-03 ((2458607j,0s,0n),+0s,2299161j)>, "憲法記念日"],
|
91
|
+
[#<Date: 2019-05-04 ((2458608j,0s,0n),+0s,2299161j)>, "みどりの日"],
|
92
|
+
[#<Date: 2019-05-05 ((2458609j,0s,0n),+0s,2299161j)>, "こどもの日"],
|
93
|
+
[#<Date: 2019-05-06 ((2458610j,0s,0n),+0s,2299161j)>, "振替休日"],
|
94
|
+
[#<Date: 2019-07-15 ((2458680j,0s,0n),+0s,2299161j)>, "海の日"],
|
95
|
+
[#<Date: 2019-08-11 ((2458707j,0s,0n),+0s,2299161j)>, "山の日"],
|
96
|
+
[#<Date: 2019-08-12 ((2458708j,0s,0n),+0s,2299161j)>, "振替休日"],
|
97
|
+
[#<Date: 2019-09-16 ((2458743j,0s,0n),+0s,2299161j)>, "敬老の日"],
|
98
|
+
[#<Date: 2019-09-23 ((2458750j,0s,0n),+0s,2299161j)>, "秋分の日"],
|
99
|
+
[#<Date: 2019-10-14 ((2458771j,0s,0n),+0s,2299161j)>, "体育の日"],
|
100
|
+
[#<Date: 2019-10-22 ((2458779j,0s,0n),+0s,2299161j)>, "即位礼正殿の儀"],
|
101
|
+
[#<Date: 2019-11-03 ((2458791j,0s,0n),+0s,2299161j)>, "文化の日"],
|
102
|
+
[#<Date: 2019-11-04 ((2458792j,0s,0n),+0s,2299161j)>, "振替休日"],
|
103
|
+
[#<Date: 2019-11-23 ((2458811j,0s,0n),+0s,2299161j)>, "勤労感謝の日"]]
|
100
104
|
```
|
101
105
|
|
102
106
|
* `hash_year(year)` ― ある年について、 {日付=>祝日名} のHashを返す
|
103
107
|
|
104
108
|
```ruby
|
105
|
-
HolidayJapan.hash_year(
|
106
|
-
=> {#<Date:
|
107
|
-
#<Date:
|
108
|
-
#<Date:
|
109
|
-
#<Date:
|
110
|
-
#<Date:
|
111
|
-
#<Date:
|
112
|
-
#<Date:
|
113
|
-
#<Date:
|
114
|
-
#<Date:
|
115
|
-
#<Date:
|
116
|
-
#<Date:
|
117
|
-
#<Date:
|
118
|
-
#<Date:
|
119
|
-
#<Date:
|
120
|
-
#<Date:
|
121
|
-
#<Date:
|
122
|
-
#<Date:
|
123
|
-
#<Date:
|
124
|
-
#<Date:
|
125
|
-
#<Date:
|
109
|
+
HolidayJapan.hash_year(2019)
|
110
|
+
=> {#<Date: 2019-01-01 ((2458485j,0s,0n),+0s,2299161j)>=>"元日",
|
111
|
+
#<Date: 2019-01-14 ((2458498j,0s,0n),+0s,2299161j)>=>"成人の日",
|
112
|
+
#<Date: 2019-02-11 ((2458526j,0s,0n),+0s,2299161j)>=>"建国記念の日",
|
113
|
+
#<Date: 2019-03-21 ((2458564j,0s,0n),+0s,2299161j)>=>"春分の日",
|
114
|
+
#<Date: 2019-04-29 ((2458603j,0s,0n),+0s,2299161j)>=>"昭和の日",
|
115
|
+
#<Date: 2019-04-30 ((2458604j,0s,0n),+0s,2299161j)>=>"国民の休日",
|
116
|
+
#<Date: 2019-05-01 ((2458605j,0s,0n),+0s,2299161j)>=>"即位の日(名称未定)",
|
117
|
+
#<Date: 2019-05-02 ((2458606j,0s,0n),+0s,2299161j)>=>"国民の休日",
|
118
|
+
#<Date: 2019-05-03 ((2458607j,0s,0n),+0s,2299161j)>=>"憲法記念日",
|
119
|
+
#<Date: 2019-05-04 ((2458608j,0s,0n),+0s,2299161j)>=>"みどりの日",
|
120
|
+
#<Date: 2019-05-05 ((2458609j,0s,0n),+0s,2299161j)>=>"こどもの日",
|
121
|
+
#<Date: 2019-05-06 ((2458610j,0s,0n),+0s,2299161j)>=>"振替休日",
|
122
|
+
#<Date: 2019-07-15 ((2458680j,0s,0n),+0s,2299161j)>=>"海の日",
|
123
|
+
#<Date: 2019-08-11 ((2458707j,0s,0n),+0s,2299161j)>=>"山の日",
|
124
|
+
#<Date: 2019-08-12 ((2458708j,0s,0n),+0s,2299161j)>=>"振替休日",
|
125
|
+
#<Date: 2019-09-16 ((2458743j,0s,0n),+0s,2299161j)>=>"敬老の日",
|
126
|
+
#<Date: 2019-09-23 ((2458750j,0s,0n),+0s,2299161j)>=>"秋分の日",
|
127
|
+
#<Date: 2019-10-14 ((2458771j,0s,0n),+0s,2299161j)>=>"体育の日",
|
128
|
+
#<Date: 2019-10-22 ((2458779j,0s,0n),+0s,2299161j)>=>"即位礼正殿の儀",
|
129
|
+
#<Date: 2019-11-03 ((2458791j,0s,0n),+0s,2299161j)>=>"文化の日",
|
130
|
+
#<Date: 2019-11-04 ((2458792j,0s,0n),+0s,2299161j)>=>"振替休日",
|
131
|
+
#<Date: 2019-11-23 ((2458811j,0s,0n),+0s,2299161j)>=>"勤労感謝の日"}
|
126
132
|
```
|
127
133
|
|
128
134
|
* `between(from_date,to_date)` ― from_date から to_date までの祝日について、{日付=>祝日名}のHashを返す
|
129
135
|
|
130
136
|
```ruby
|
131
|
-
HolidayJapan.between("
|
132
|
-
=> {#<Date:
|
133
|
-
#<Date:
|
134
|
-
#<Date:
|
135
|
-
#<Date:
|
136
|
-
#<Date:
|
137
|
-
#<Date:
|
138
|
-
#<Date:
|
139
|
-
#<Date:
|
140
|
-
#<Date:
|
141
|
-
#<Date:
|
142
|
-
#<Date:
|
143
|
-
#<Date:
|
144
|
-
#<Date:
|
145
|
-
#<Date:
|
146
|
-
#<Date:
|
147
|
-
#<Date: 2019-
|
148
|
-
#<Date: 2019-
|
149
|
-
#<Date: 2019-
|
150
|
-
#<Date:
|
137
|
+
HolidayJapan.between("2019-4-1","2020-3-31")
|
138
|
+
=> {#<Date: 2019-04-29 ((2458603j,0s,0n),+0s,2299161j)>=>"昭和の日",
|
139
|
+
#<Date: 2019-04-30 ((2458604j,0s,0n),+0s,2299161j)>=>"国民の休日",
|
140
|
+
#<Date: 2019-05-01 ((2458605j,0s,0n),+0s,2299161j)>=>"即位の日(名称未定)",
|
141
|
+
#<Date: 2019-05-02 ((2458606j,0s,0n),+0s,2299161j)>=>"国民の休日",
|
142
|
+
#<Date: 2019-05-03 ((2458607j,0s,0n),+0s,2299161j)>=>"憲法記念日",
|
143
|
+
#<Date: 2019-05-04 ((2458608j,0s,0n),+0s,2299161j)>=>"みどりの日",
|
144
|
+
#<Date: 2019-05-05 ((2458609j,0s,0n),+0s,2299161j)>=>"こどもの日",
|
145
|
+
#<Date: 2019-05-06 ((2458610j,0s,0n),+0s,2299161j)>=>"振替休日",
|
146
|
+
#<Date: 2019-07-15 ((2458680j,0s,0n),+0s,2299161j)>=>"海の日",
|
147
|
+
#<Date: 2019-08-11 ((2458707j,0s,0n),+0s,2299161j)>=>"山の日",
|
148
|
+
#<Date: 2019-08-12 ((2458708j,0s,0n),+0s,2299161j)>=>"振替休日",
|
149
|
+
#<Date: 2019-09-16 ((2458743j,0s,0n),+0s,2299161j)>=>"敬老の日",
|
150
|
+
#<Date: 2019-09-23 ((2458750j,0s,0n),+0s,2299161j)>=>"秋分の日",
|
151
|
+
#<Date: 2019-10-14 ((2458771j,0s,0n),+0s,2299161j)>=>"体育の日",
|
152
|
+
#<Date: 2019-10-22 ((2458779j,0s,0n),+0s,2299161j)>=>"即位礼正殿の儀",
|
153
|
+
#<Date: 2019-11-03 ((2458791j,0s,0n),+0s,2299161j)>=>"文化の日",
|
154
|
+
#<Date: 2019-11-04 ((2458792j,0s,0n),+0s,2299161j)>=>"振替休日",
|
155
|
+
#<Date: 2019-11-23 ((2458811j,0s,0n),+0s,2299161j)>=>"勤労感謝の日",
|
156
|
+
#<Date: 2020-01-01 ((2458850j,0s,0n),+0s,2299161j)>=>"元日",
|
157
|
+
#<Date: 2020-01-13 ((2458862j,0s,0n),+0s,2299161j)>=>"成人の日",
|
158
|
+
#<Date: 2020-02-11 ((2458891j,0s,0n),+0s,2299161j)>=>"建国記念の日",
|
159
|
+
#<Date: 2020-02-23 ((2458903j,0s,0n),+0s,2299161j)>=>"天皇誕生日",
|
160
|
+
#<Date: 2020-02-24 ((2458904j,0s,0n),+0s,2299161j)>=>"振替休日",
|
161
|
+
#<Date: 2020-03-20 ((2458929j,0s,0n),+0s,2299161j)>=>"春分の日"}
|
151
162
|
```
|
152
163
|
|
153
164
|
### 祝日データをCSVに出力
|
154
165
|
|
155
166
|
```
|
156
|
-
$ ruby -r csv -r holiday_japan -e 'CSV.open("holiday.csv","w"){|c| HolidayJapan.between(
|
157
|
-
|
167
|
+
$ ruby -r csv -r holiday_japan -e 'CSV.open("holiday.csv","w"){|c| HolidayJapan.between(2018,2020).each{|a| c<<a}}'
|
158
168
|
$ head -n3 holiday.csv ; echo ...; tail -n3 holiday.csv
|
159
|
-
|
160
|
-
|
161
|
-
|
169
|
+
2018-01-01,元日
|
170
|
+
2018-01-08,成人の日
|
171
|
+
2018-02-11,建国記念の日
|
162
172
|
...
|
163
|
-
|
164
|
-
|
165
|
-
|
173
|
+
2020-09-22,秋分の日
|
174
|
+
2020-11-03,文化の日
|
175
|
+
2020-11-23,勤労感謝の日
|
166
176
|
```
|
167
177
|
|
168
178
|
## 祝日データ
|
169
179
|
|
170
180
|
* 1948年7月20日(祝日法発令) 以降の祝日に対応
|
171
|
-
*
|
181
|
+
* 2020年の[暦要項](http://eco.mtk.nao.ac.jp/koyomi/yoko/)まで確認(法改正がない限り以降も有効)
|
172
182
|
* 春分の日・秋分の日の計算は2150年まで
|
173
183
|
|
174
184
|
## Author:
|
@@ -181,7 +191,7 @@
|
|
181
191
|
NO WARRANTY.
|
182
192
|
|
183
193
|
## Version:
|
184
|
-
2018-04-14 ver 1.4 祝日データ仕様変更、2020年対応
|
194
|
+
2018-04-14 ver 1.4 祝日データ仕様変更、2019,2020年対応
|
185
195
|
2017-12-01 ver 1.3 print_between 関数追加
|
186
196
|
2015-04-11 ver 1.2 hash_year, between 関数追加
|
187
197
|
2014-05-23 ver 1.1 「山の日」追加
|
data/README.md.erb
ADDED
@@ -0,0 +1,123 @@
|
|
1
|
+
<%
|
2
|
+
# erb -T 1 README.md.erb > README.md
|
3
|
+
require 'pp'
|
4
|
+
require 'holiday_japan'
|
5
|
+
$indent=' '
|
6
|
+
|
7
|
+
def x(sample)
|
8
|
+
a = eval(sample).pretty_inspect.each_line.to_a
|
9
|
+
[
|
10
|
+
"```ruby\n",
|
11
|
+
sample+"\n",
|
12
|
+
"=> "+a.shift,
|
13
|
+
*a.map{|x| " "+x },
|
14
|
+
"```\n"
|
15
|
+
].map{|x| $indent+x}.join
|
16
|
+
end
|
17
|
+
|
18
|
+
def c(sample)
|
19
|
+
[
|
20
|
+
"$ "+sample+"\n",
|
21
|
+
*`#{sample}`.each_line.to_a,
|
22
|
+
].map{|x| $indent+x}.join
|
23
|
+
end
|
24
|
+
%>
|
25
|
+
# 日本の祝日判定Rubyプログラム
|
26
|
+
|
27
|
+
([GitHub](https://github.com/masa16/holiday_japan)),
|
28
|
+
([RubyGems](https://rubygems.org/gems/holiday_japan))
|
29
|
+
|
30
|
+
## 特徴
|
31
|
+
* 1948年7月20日以降の日本の国民の祝日、振替休日、および国民の休日を計算して判定。
|
32
|
+
* スクリプトコード([holiday_japan.rb](https://github.com/masa16/holiday_japan/blob/master/lib/holiday_japan.rb))は、祝日データを含めて200行弱とコンパクト。
|
33
|
+
|
34
|
+
(date2 の holiday.rb と比較して)
|
35
|
+
* 祝日をキャッシュすることにより、大量の日付について祝日判定する場合でも高速に動作
|
36
|
+
* 祝日名を返すことが可能
|
37
|
+
* 祝日のルールをテーブルで持つことにより、法改正による祝日変更への対応が容易
|
38
|
+
|
39
|
+
## インストール
|
40
|
+
|
41
|
+
* RubyGems によるインストール
|
42
|
+
```
|
43
|
+
gem install holiday_japan
|
44
|
+
```
|
45
|
+
|
46
|
+
* または、[holiday_japan.rb](https://github.com/masa16/holiday_japan/blob/master/lib/holiday_japan.rb)
|
47
|
+
のスクリプトファイルを ruby のライブラリパスに置く
|
48
|
+
|
49
|
+
## 使い方
|
50
|
+
|
51
|
+
### モジュールをロード
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
require 'holiday_japan'
|
55
|
+
```
|
56
|
+
|
57
|
+
### HolidayJapan モジュール関数
|
58
|
+
|
59
|
+
* `check(date)` ― Dateクラスのオブジェクトによる祝日判定
|
60
|
+
|
61
|
+
<%= x('HolidayJapan.check(Date.new(2019,3,21))') %>
|
62
|
+
|
63
|
+
* `name(date)` ― 日付が祝日の場合は祝日名を返し、祝日でなければ nil を返す。
|
64
|
+
|
65
|
+
<%= x('HolidayJapan.name(Date.new(2019,3,21))') %>
|
66
|
+
|
67
|
+
* `print_year(year)` ― ある年の祝日一覧をプリント
|
68
|
+
|
69
|
+
```
|
70
|
+
<%= c("ruby -r holiday_japan -e 'HolidayJapan.print_year 2019'") %>
|
71
|
+
```
|
72
|
+
|
73
|
+
* `list_year(year)` ― ある年について、 [日付, 祝日名] のArrayを返す
|
74
|
+
|
75
|
+
<%= x('HolidayJapan.list_year(2019)') %>
|
76
|
+
|
77
|
+
* `hash_year(year)` ― ある年について、 {日付=>祝日名} のHashを返す
|
78
|
+
|
79
|
+
<%= x('HolidayJapan.hash_year(2019)') %>
|
80
|
+
|
81
|
+
* `between(from_date,to_date)` ― from_date から to_date までの祝日について、{日付=>祝日名}のHashを返す
|
82
|
+
|
83
|
+
<%= x('HolidayJapan.between("2019-4-1","2020-3-31")') %>
|
84
|
+
|
85
|
+
### 祝日データをCSVに出力
|
86
|
+
|
87
|
+
```
|
88
|
+
<%= c(%!ruby -r csv -r holiday_japan -e 'CSV.open("holiday.csv","w"){|c| HolidayJapan.between(2018,2020).each{|a| c<<a}}'!) %>
|
89
|
+
<%= c("head -n3 holiday.csv ; echo ...; tail -n3 holiday.csv") %>
|
90
|
+
```
|
91
|
+
|
92
|
+
## 祝日データ
|
93
|
+
|
94
|
+
* 1948年7月20日(祝日法発令) 以降の祝日に対応
|
95
|
+
* 2020年の[暦要項](http://eco.mtk.nao.ac.jp/koyomi/yoko/)まで確認(法改正がない限り以降も有効)
|
96
|
+
* 春分の日・秋分の日の計算は2150年まで
|
97
|
+
|
98
|
+
## Author:
|
99
|
+
Masahiro TANAKA
|
100
|
+
|
101
|
+
## Copyright:
|
102
|
+
(C) Copyright 2003-2018 by Masahiro TANAKA
|
103
|
+
This program is free software under MIT license.
|
104
|
+
See LICENSE.txt.
|
105
|
+
NO WARRANTY.
|
106
|
+
|
107
|
+
## Version:
|
108
|
+
2018-04-14 ver 1.4 祝日データ仕様変更、2019,2020年対応
|
109
|
+
2017-12-01 ver 1.3 print_between 関数追加
|
110
|
+
2015-04-11 ver 1.2 hash_year, between 関数追加
|
111
|
+
2014-05-23 ver 1.1 「山の日」追加
|
112
|
+
2012-12-23 ver 1.0 モジュール名を Holiday から HolidayJapan に変更
|
113
|
+
2007-08-02 ver 0.9 リファクタリング
|
114
|
+
2007-03-08 ver 0.8 祝日データクラスを統一、データを配列で記述
|
115
|
+
2006-02-06 ver 0.7 平成19年(西暦2007年)の暦要項 反映(祝日法改正)
|
116
|
+
Holiday.create_table 修正
|
117
|
+
Holiday.list_year 追加
|
118
|
+
2003-10-02 ver 0.6 祝日データ追加
|
119
|
+
2003-09-29 ver 0.5
|
120
|
+
2003-09-22 ver 0.4
|
121
|
+
2003-09-20 ver 0.3
|
122
|
+
2003-09-16 ver 0.2
|
123
|
+
2003-09-15 ver 0.1
|
data/Rakefile
CHANGED
data/lib/holiday_japan.rb
CHANGED
@@ -6,7 +6,7 @@ require "date"
|
|
6
6
|
|
7
7
|
module HolidayJapan
|
8
8
|
|
9
|
-
VERSION = "1.4.
|
9
|
+
VERSION = "1.4.3"
|
10
10
|
|
11
11
|
WEEK1 = 1
|
12
12
|
WEEK2 = 8
|
@@ -54,7 +54,7 @@ module HolidayJapan
|
|
54
54
|
],
|
55
55
|
["即位礼正殿の儀", [2019, 10, 22 ],
|
56
56
|
[1990, 11, 12 ]],
|
57
|
-
["
|
57
|
+
["天皇の即位の日", [2019, 5, 1 ]],
|
58
58
|
["皇太子徳仁親王の結婚の儀", [1993, 6, 9 ]],
|
59
59
|
["昭和天皇の大喪の礼", [1989, 2, 24 ]],
|
60
60
|
["皇太子明仁親王の結婚の儀", [1959, 4, 10 ]]
|
data/test/holiday.csv
CHANGED
@@ -979,3 +979,21 @@
|
|
979
979
|
2019-11-03,文化の日
|
980
980
|
2019-11-04,振替休日
|
981
981
|
2019-11-23,勤労感謝の日
|
982
|
+
2020-01-01,元日
|
983
|
+
2020-01-13,成人の日
|
984
|
+
2020-02-11,建国記念の日
|
985
|
+
2020-02-23,天皇誕生日
|
986
|
+
2020-02-24,振替休日
|
987
|
+
2020-03-20,春分の日
|
988
|
+
2020-04-29,昭和の日
|
989
|
+
2020-05-03,憲法記念日
|
990
|
+
2020-05-04,みどりの日
|
991
|
+
2020-05-05,こどもの日
|
992
|
+
2020-05-06,振替休日
|
993
|
+
2020-07-23,海の日
|
994
|
+
2020-07-24,スポーツの日
|
995
|
+
2020-08-10,山の日
|
996
|
+
2020-09-21,敬老の日
|
997
|
+
2020-09-22,秋分の日
|
998
|
+
2020-11-03,文化の日
|
999
|
+
2020-11-23,勤労感謝の日
|
data/test/holiday_japan_test.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: holiday_japan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masahiro TANAKA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Calculate National Holidays of Japan after 1948
|
14
14
|
email:
|
@@ -21,6 +21,7 @@ files:
|
|
21
21
|
- Gemfile
|
22
22
|
- LICENSE.txt
|
23
23
|
- README.md
|
24
|
+
- README.md.erb
|
24
25
|
- Rakefile
|
25
26
|
- holiday_japan.gemspec
|
26
27
|
- lib/holiday_japan.rb
|
@@ -45,8 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
45
46
|
- !ruby/object:Gem::Version
|
46
47
|
version: '0'
|
47
48
|
requirements: []
|
48
|
-
|
49
|
-
rubygems_version: 2.7.8
|
49
|
+
rubygems_version: 3.0.1
|
50
50
|
signing_key:
|
51
51
|
specification_version: 4
|
52
52
|
summary: Calculate National Holidays of Japan
|