holiday_jp 0.4.3 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +9 -3
- data/CHANGELOG.md +9 -0
- data/README.md +8 -2
- data/Rakefile +1 -1
- data/benchmark.rb +12 -11
- data/holidays.yml +34 -34
- data/lib/holiday_jp/holiday.rb +2 -1
- data/lib/holiday_jp/version.rb +1 -1
- data/test/test_holiday_jp.rb +15 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3a83adb4ef5301da1296e6408f84bfea48f136ad
|
|
4
|
+
data.tar.gz: a0d0ae34f282ace55bc8e11d0d48dfba7beac6c6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dabfedac54118b70a47f1915ecf9db495b28c42118178db3ce934d6192ef46c9ba9321f6ebe90da016e35d9008e5ec3df226a20c11def09a3cf7a5edfd9b50b3
|
|
7
|
+
data.tar.gz: a2fd4fd308deff957519485a863f39e45071957b30265adc88511eaac3b303f1c205ed5af79842f8f2e71e869270eaa390bd78edd133a7b25689ab71435dd614
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
|
@@ -4,8 +4,14 @@ Get holidays in Japan.
|
|
|
4
4
|
|
|
5
5
|
## USAGE
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
```ruby
|
|
8
|
+
holidays = HolidayJp.between(Date.new(2010, 9, 14), Date.new(2010, 9, 21))
|
|
9
|
+
holidays.first.name # 敬老の日
|
|
10
|
+
HolidayJp.holiday?(Date.new(2016, 8 ,11)) # true
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Supported Ruby Version
|
|
14
|
+
Ruby 1.9.3+
|
|
9
15
|
|
|
10
16
|
## Note on Patches/Pull Requests
|
|
11
17
|
|
data/Rakefile
CHANGED
data/benchmark.rb
CHANGED
|
@@ -3,21 +3,22 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
|
|
|
3
3
|
require 'holiday_jp'
|
|
4
4
|
|
|
5
5
|
def bench_holiday
|
|
6
|
-
Benchmark.measure
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
Benchmark.measure do
|
|
7
|
+
d = Date.new(2011, 9, 19)
|
|
8
|
+
10000.times do
|
|
9
|
+
HolidayJp.holiday?(d)
|
|
10
|
+
end
|
|
10
11
|
end
|
|
11
|
-
}
|
|
12
12
|
end
|
|
13
|
+
|
|
13
14
|
def bench_between
|
|
14
|
-
Benchmark.measure
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
Benchmark.measure do
|
|
16
|
+
d = Date.new(2009, 1, 1)
|
|
17
|
+
d2 = Date.new(2009, 12, 31)
|
|
18
|
+
10000.times do
|
|
19
|
+
HolidayJp.between(d, d2)
|
|
20
|
+
end
|
|
19
21
|
end
|
|
20
|
-
}
|
|
21
22
|
end
|
|
22
23
|
|
|
23
24
|
puts bench_holiday
|
data/holidays.yml
CHANGED
|
@@ -720,6 +720,7 @@
|
|
|
720
720
|
2017-01-02: 振替休日
|
|
721
721
|
2017-01-09: 成人の日
|
|
722
722
|
2017-02-11: 建国記念の日
|
|
723
|
+
2017-02-23: 天皇誕生日
|
|
723
724
|
2017-03-20: 春分の日
|
|
724
725
|
2017-04-29: 昭和の日
|
|
725
726
|
2017-05-03: 憲法記念日
|
|
@@ -732,11 +733,11 @@
|
|
|
732
733
|
2017-10-09: 体育の日
|
|
733
734
|
2017-11-03: 文化の日
|
|
734
735
|
2017-11-23: 勤労感謝の日
|
|
735
|
-
2017-12-23: 天皇誕生日
|
|
736
736
|
2018-01-01: 元日
|
|
737
737
|
2018-01-08: 成人の日
|
|
738
738
|
2018-02-11: 建国記念の日
|
|
739
739
|
2018-02-12: 振替休日
|
|
740
|
+
2018-02-23: 天皇誕生日
|
|
740
741
|
2018-03-21: 春分の日
|
|
741
742
|
2018-04-29: 昭和の日
|
|
742
743
|
2018-04-30: 振替休日
|
|
@@ -751,11 +752,11 @@
|
|
|
751
752
|
2018-10-08: 体育の日
|
|
752
753
|
2018-11-03: 文化の日
|
|
753
754
|
2018-11-23: 勤労感謝の日
|
|
754
|
-
2018-12-23: 天皇誕生日
|
|
755
755
|
2018-12-24: 振替休日
|
|
756
756
|
2019-01-01: 元日
|
|
757
757
|
2019-01-14: 成人の日
|
|
758
758
|
2019-02-11: 建国記念の日
|
|
759
|
+
2019-02-23: 天皇誕生日
|
|
759
760
|
2019-03-21: 春分の日
|
|
760
761
|
2019-04-29: 昭和の日
|
|
761
762
|
2019-05-03: 憲法記念日
|
|
@@ -771,10 +772,10 @@
|
|
|
771
772
|
2019-11-03: 文化の日
|
|
772
773
|
2019-11-04: 振替休日
|
|
773
774
|
2019-11-23: 勤労感謝の日
|
|
774
|
-
2019-12-23: 天皇誕生日
|
|
775
775
|
2020-01-01: 元日
|
|
776
776
|
2020-01-13: 成人の日
|
|
777
777
|
2020-02-11: 建国記念の日
|
|
778
|
+
2020-02-23: 天皇誕生日
|
|
778
779
|
2020-03-20: 春分の日
|
|
779
780
|
2020-04-29: 昭和の日
|
|
780
781
|
2020-05-03: 憲法記念日
|
|
@@ -788,10 +789,10 @@
|
|
|
788
789
|
2020-10-12: 体育の日
|
|
789
790
|
2020-11-03: 文化の日
|
|
790
791
|
2020-11-23: 勤労感謝の日
|
|
791
|
-
2020-12-23: 天皇誕生日
|
|
792
792
|
2021-01-01: 元日
|
|
793
793
|
2021-01-11: 成人の日
|
|
794
794
|
2021-02-11: 建国記念の日
|
|
795
|
+
2021-02-23: 天皇誕生日
|
|
795
796
|
2021-03-20: 春分の日
|
|
796
797
|
2021-04-29: 昭和の日
|
|
797
798
|
2021-05-03: 憲法記念日
|
|
@@ -804,10 +805,10 @@
|
|
|
804
805
|
2021-10-11: 体育の日
|
|
805
806
|
2021-11-03: 文化の日
|
|
806
807
|
2021-11-23: 勤労感謝の日
|
|
807
|
-
2021-12-23: 天皇誕生日
|
|
808
808
|
2022-01-01: 元日
|
|
809
809
|
2022-01-10: 成人の日
|
|
810
810
|
2022-02-11: 建国記念の日
|
|
811
|
+
2022-02-23: 天皇誕生日
|
|
811
812
|
2022-03-21: 春分の日
|
|
812
813
|
2022-04-29: 昭和の日
|
|
813
814
|
2022-05-03: 憲法記念日
|
|
@@ -820,11 +821,11 @@
|
|
|
820
821
|
2022-10-10: 体育の日
|
|
821
822
|
2022-11-03: 文化の日
|
|
822
823
|
2022-11-23: 勤労感謝の日
|
|
823
|
-
2022-12-23: 天皇誕生日
|
|
824
824
|
2023-01-01: 元日
|
|
825
825
|
2023-01-02: 振替休日
|
|
826
826
|
2023-01-09: 成人の日
|
|
827
827
|
2023-02-11: 建国記念の日
|
|
828
|
+
2023-02-23: 天皇誕生日
|
|
828
829
|
2023-03-21: 春分の日
|
|
829
830
|
2023-04-29: 昭和の日
|
|
830
831
|
2023-05-03: 憲法記念日
|
|
@@ -837,11 +838,11 @@
|
|
|
837
838
|
2023-10-09: 体育の日
|
|
838
839
|
2023-11-03: 文化の日
|
|
839
840
|
2023-11-23: 勤労感謝の日
|
|
840
|
-
2023-12-23: 天皇誕生日
|
|
841
841
|
2024-01-01: 元日
|
|
842
842
|
2024-01-08: 成人の日
|
|
843
843
|
2024-02-11: 建国記念の日
|
|
844
844
|
2024-02-12: 振替休日
|
|
845
|
+
2024-02-23: 天皇誕生日
|
|
845
846
|
2024-03-20: 春分の日
|
|
846
847
|
2024-04-29: 昭和の日
|
|
847
848
|
2024-05-03: 憲法記念日
|
|
@@ -858,10 +859,10 @@
|
|
|
858
859
|
2024-11-03: 文化の日
|
|
859
860
|
2024-11-04: 振替休日
|
|
860
861
|
2024-11-23: 勤労感謝の日
|
|
861
|
-
2024-12-23: 天皇誕生日
|
|
862
862
|
2025-01-01: 元日
|
|
863
863
|
2025-01-13: 成人の日
|
|
864
864
|
2025-02-11: 建国記念の日
|
|
865
|
+
2025-02-23: 天皇誕生日
|
|
865
866
|
2025-03-20: 春分の日
|
|
866
867
|
2025-04-29: 昭和の日
|
|
867
868
|
2025-05-03: 憲法記念日
|
|
@@ -876,10 +877,10 @@
|
|
|
876
877
|
2025-11-03: 文化の日
|
|
877
878
|
2025-11-23: 勤労感謝の日
|
|
878
879
|
2025-11-24: 振替休日
|
|
879
|
-
2025-12-23: 天皇誕生日
|
|
880
880
|
2026-01-01: 元日
|
|
881
881
|
2026-01-12: 成人の日
|
|
882
882
|
2026-02-11: 建国記念の日
|
|
883
|
+
2026-02-23: 天皇誕生日
|
|
883
884
|
2026-03-20: 春分の日
|
|
884
885
|
2026-04-29: 昭和の日
|
|
885
886
|
2026-05-03: 憲法記念日
|
|
@@ -894,10 +895,10 @@
|
|
|
894
895
|
2026-10-12: 体育の日
|
|
895
896
|
2026-11-03: 文化の日
|
|
896
897
|
2026-11-23: 勤労感謝の日
|
|
897
|
-
2026-12-23: 天皇誕生日
|
|
898
898
|
2027-01-01: 元日
|
|
899
899
|
2027-01-11: 成人の日
|
|
900
900
|
2027-02-11: 建国記念の日
|
|
901
|
+
2027-02-23: 天皇誕生日
|
|
901
902
|
2027-03-21: 春分の日
|
|
902
903
|
2027-03-22: 振替休日
|
|
903
904
|
2027-04-29: 昭和の日
|
|
@@ -911,10 +912,10 @@
|
|
|
911
912
|
2027-10-11: 体育の日
|
|
912
913
|
2027-11-03: 文化の日
|
|
913
914
|
2027-11-23: 勤労感謝の日
|
|
914
|
-
2027-12-23: 天皇誕生日
|
|
915
915
|
2028-01-01: 元日
|
|
916
916
|
2028-01-10: 成人の日
|
|
917
917
|
2028-02-11: 建国記念の日
|
|
918
|
+
2028-02-23: 天皇誕生日
|
|
918
919
|
2028-03-20: 春分の日
|
|
919
920
|
2028-04-29: 昭和の日
|
|
920
921
|
2028-05-03: 憲法記念日
|
|
@@ -927,11 +928,11 @@
|
|
|
927
928
|
2028-10-09: 体育の日
|
|
928
929
|
2028-11-03: 文化の日
|
|
929
930
|
2028-11-23: 勤労感謝の日
|
|
930
|
-
2028-12-23: 天皇誕生日
|
|
931
931
|
2029-01-01: 元日
|
|
932
932
|
2029-01-08: 成人の日
|
|
933
933
|
2029-02-11: 建国記念の日
|
|
934
934
|
2029-02-12: 振替休日
|
|
935
|
+
2029-02-23: 天皇誕生日
|
|
935
936
|
2029-03-20: 春分の日
|
|
936
937
|
2029-04-29: 昭和の日
|
|
937
938
|
2029-04-30: 振替休日
|
|
@@ -946,11 +947,11 @@
|
|
|
946
947
|
2029-10-08: 体育の日
|
|
947
948
|
2029-11-03: 文化の日
|
|
948
949
|
2029-11-23: 勤労感謝の日
|
|
949
|
-
2029-12-23: 天皇誕生日
|
|
950
950
|
2029-12-24: 振替休日
|
|
951
951
|
2030-01-01: 元日
|
|
952
952
|
2030-01-14: 成人の日
|
|
953
953
|
2030-02-11: 建国記念の日
|
|
954
|
+
2030-02-23: 天皇誕生日
|
|
954
955
|
2030-03-20: 春分の日
|
|
955
956
|
2030-04-29: 昭和の日
|
|
956
957
|
2030-05-03: 憲法記念日
|
|
@@ -966,10 +967,10 @@
|
|
|
966
967
|
2030-11-03: 文化の日
|
|
967
968
|
2030-11-04: 振替休日
|
|
968
969
|
2030-11-23: 勤労感謝の日
|
|
969
|
-
2030-12-23: 天皇誕生日
|
|
970
970
|
2031-01-01: 元日
|
|
971
971
|
2031-01-13: 成人の日
|
|
972
972
|
2031-02-11: 建国記念の日
|
|
973
|
+
2031-02-23: 天皇誕生日
|
|
973
974
|
2031-03-21: 春分の日
|
|
974
975
|
2031-04-29: 昭和の日
|
|
975
976
|
2031-05-03: 憲法記念日
|
|
@@ -984,10 +985,10 @@
|
|
|
984
985
|
2031-11-03: 文化の日
|
|
985
986
|
2031-11-23: 勤労感謝の日
|
|
986
987
|
2031-11-24: 振替休日
|
|
987
|
-
2031-12-23: 天皇誕生日
|
|
988
988
|
2032-01-01: 元日
|
|
989
989
|
2032-01-12: 成人の日
|
|
990
990
|
2032-02-11: 建国記念の日
|
|
991
|
+
2032-02-23: 天皇誕生日
|
|
991
992
|
2032-03-20: 春分の日
|
|
992
993
|
2032-04-29: 昭和の日
|
|
993
994
|
2032-05-03: 憲法記念日
|
|
@@ -1001,10 +1002,10 @@
|
|
|
1001
1002
|
2032-10-11: 体育の日
|
|
1002
1003
|
2032-11-03: 文化の日
|
|
1003
1004
|
2032-11-23: 勤労感謝の日
|
|
1004
|
-
2032-12-23: 天皇誕生日
|
|
1005
1005
|
2033-01-01: 元日
|
|
1006
1006
|
2033-01-10: 成人の日
|
|
1007
1007
|
2033-02-11: 建国記念の日
|
|
1008
|
+
2033-02-23: 天皇誕生日
|
|
1008
1009
|
2033-03-20: 春分の日
|
|
1009
1010
|
2033-03-21: 振替休日
|
|
1010
1011
|
2033-04-29: 昭和の日
|
|
@@ -1018,11 +1019,11 @@
|
|
|
1018
1019
|
2033-10-10: 体育の日
|
|
1019
1020
|
2033-11-03: 文化の日
|
|
1020
1021
|
2033-11-23: 勤労感謝の日
|
|
1021
|
-
2033-12-23: 天皇誕生日
|
|
1022
1022
|
2034-01-01: 元日
|
|
1023
1023
|
2034-01-02: 振替休日
|
|
1024
1024
|
2034-01-09: 成人の日
|
|
1025
1025
|
2034-02-11: 建国記念の日
|
|
1026
|
+
2034-02-23: 天皇誕生日
|
|
1026
1027
|
2034-03-20: 春分の日
|
|
1027
1028
|
2034-04-29: 昭和の日
|
|
1028
1029
|
2034-05-03: 憲法記念日
|
|
@@ -1035,11 +1036,11 @@
|
|
|
1035
1036
|
2034-10-09: 体育の日
|
|
1036
1037
|
2034-11-03: 文化の日
|
|
1037
1038
|
2034-11-23: 勤労感謝の日
|
|
1038
|
-
2034-12-23: 天皇誕生日
|
|
1039
1039
|
2035-01-01: 元日
|
|
1040
1040
|
2035-01-08: 成人の日
|
|
1041
1041
|
2035-02-11: 建国記念の日
|
|
1042
1042
|
2035-02-12: 振替休日
|
|
1043
|
+
2035-02-23: 天皇誕生日
|
|
1043
1044
|
2035-03-21: 春分の日
|
|
1044
1045
|
2035-04-29: 昭和の日
|
|
1045
1046
|
2035-04-30: 振替休日
|
|
@@ -1054,11 +1055,11 @@
|
|
|
1054
1055
|
2035-10-08: 体育の日
|
|
1055
1056
|
2035-11-03: 文化の日
|
|
1056
1057
|
2035-11-23: 勤労感謝の日
|
|
1057
|
-
2035-12-23: 天皇誕生日
|
|
1058
1058
|
2035-12-24: 振替休日
|
|
1059
1059
|
2036-01-01: 元日
|
|
1060
1060
|
2036-01-14: 成人の日
|
|
1061
1061
|
2036-02-11: 建国記念の日
|
|
1062
|
+
2036-02-23: 天皇誕生日
|
|
1062
1063
|
2036-03-20: 春分の日
|
|
1063
1064
|
2036-04-29: 昭和の日
|
|
1064
1065
|
2036-05-03: 憲法記念日
|
|
@@ -1073,10 +1074,10 @@
|
|
|
1073
1074
|
2036-11-03: 文化の日
|
|
1074
1075
|
2036-11-23: 勤労感謝の日
|
|
1075
1076
|
2036-11-24: 振替休日
|
|
1076
|
-
2036-12-23: 天皇誕生日
|
|
1077
1077
|
2037-01-01: 元日
|
|
1078
1078
|
2037-01-12: 成人の日
|
|
1079
1079
|
2037-02-11: 建国記念の日
|
|
1080
|
+
2037-02-23: 天皇誕生日
|
|
1080
1081
|
2037-03-20: 春分の日
|
|
1081
1082
|
2037-04-29: 昭和の日
|
|
1082
1083
|
2037-05-03: 憲法記念日
|
|
@@ -1091,10 +1092,10 @@
|
|
|
1091
1092
|
2037-10-12: 体育の日
|
|
1092
1093
|
2037-11-03: 文化の日
|
|
1093
1094
|
2037-11-23: 勤労感謝の日
|
|
1094
|
-
2037-12-23: 天皇誕生日
|
|
1095
1095
|
2038-01-01: 元日
|
|
1096
1096
|
2038-01-11: 成人の日
|
|
1097
1097
|
2038-02-11: 建国記念の日
|
|
1098
|
+
2038-02-23: 天皇誕生日
|
|
1098
1099
|
2038-03-20: 春分の日
|
|
1099
1100
|
2038-04-29: 昭和の日
|
|
1100
1101
|
2038-05-03: 憲法記念日
|
|
@@ -1107,10 +1108,10 @@
|
|
|
1107
1108
|
2038-10-11: 体育の日
|
|
1108
1109
|
2038-11-03: 文化の日
|
|
1109
1110
|
2038-11-23: 勤労感謝の日
|
|
1110
|
-
2038-12-23: 天皇誕生日
|
|
1111
1111
|
2039-01-01: 元日
|
|
1112
1112
|
2039-01-10: 成人の日
|
|
1113
1113
|
2039-02-11: 建国記念の日
|
|
1114
|
+
2039-02-23: 天皇誕生日
|
|
1114
1115
|
2039-03-21: 春分の日
|
|
1115
1116
|
2039-04-29: 昭和の日
|
|
1116
1117
|
2039-05-03: 憲法記念日
|
|
@@ -1123,11 +1124,11 @@
|
|
|
1123
1124
|
2039-10-10: 体育の日
|
|
1124
1125
|
2039-11-03: 文化の日
|
|
1125
1126
|
2039-11-23: 勤労感謝の日
|
|
1126
|
-
2039-12-23: 天皇誕生日
|
|
1127
1127
|
2040-01-01: 元日
|
|
1128
1128
|
2040-01-02: 振替休日
|
|
1129
1129
|
2040-01-09: 成人の日
|
|
1130
1130
|
2040-02-11: 建国記念の日
|
|
1131
|
+
2040-02-23: 天皇誕生日
|
|
1131
1132
|
2040-03-20: 春分の日
|
|
1132
1133
|
2040-04-29: 昭和の日
|
|
1133
1134
|
2040-04-30: 振替休日
|
|
@@ -1141,11 +1142,11 @@
|
|
|
1141
1142
|
2040-10-08: 体育の日
|
|
1142
1143
|
2040-11-03: 文化の日
|
|
1143
1144
|
2040-11-23: 勤労感謝の日
|
|
1144
|
-
2040-12-23: 天皇誕生日
|
|
1145
1145
|
2040-12-24: 振替休日
|
|
1146
1146
|
2041-01-01: 元日
|
|
1147
1147
|
2041-01-14: 成人の日
|
|
1148
1148
|
2041-02-11: 建国記念の日
|
|
1149
|
+
2041-02-23: 天皇誕生日
|
|
1149
1150
|
2041-03-20: 春分の日
|
|
1150
1151
|
2041-04-29: 昭和の日
|
|
1151
1152
|
2041-05-03: 憲法記念日
|
|
@@ -1161,10 +1162,10 @@
|
|
|
1161
1162
|
2041-11-03: 文化の日
|
|
1162
1163
|
2041-11-04: 振替休日
|
|
1163
1164
|
2041-11-23: 勤労感謝の日
|
|
1164
|
-
2041-12-23: 天皇誕生日
|
|
1165
1165
|
2042-01-01: 元日
|
|
1166
1166
|
2042-01-13: 成人の日
|
|
1167
1167
|
2042-02-11: 建国記念の日
|
|
1168
|
+
2042-02-23: 天皇誕生日
|
|
1168
1169
|
2042-03-20: 春分の日
|
|
1169
1170
|
2042-04-29: 昭和の日
|
|
1170
1171
|
2042-05-03: 憲法記念日
|
|
@@ -1179,10 +1180,10 @@
|
|
|
1179
1180
|
2042-11-03: 文化の日
|
|
1180
1181
|
2042-11-23: 勤労感謝の日
|
|
1181
1182
|
2042-11-24: 振替休日
|
|
1182
|
-
2042-12-23: 天皇誕生日
|
|
1183
1183
|
2043-01-01: 元日
|
|
1184
1184
|
2043-01-12: 成人の日
|
|
1185
1185
|
2043-02-11: 建国記念の日
|
|
1186
|
+
2043-02-23: 天皇誕生日
|
|
1186
1187
|
2043-03-21: 春分の日
|
|
1187
1188
|
2043-04-29: 昭和の日
|
|
1188
1189
|
2043-05-03: 憲法記念日
|
|
@@ -1197,10 +1198,10 @@
|
|
|
1197
1198
|
2043-10-12: 体育の日
|
|
1198
1199
|
2043-11-03: 文化の日
|
|
1199
1200
|
2043-11-23: 勤労感謝の日
|
|
1200
|
-
2043-12-23: 天皇誕生日
|
|
1201
1201
|
2044-01-01: 元日
|
|
1202
1202
|
2044-01-11: 成人の日
|
|
1203
1203
|
2044-02-11: 建国記念の日
|
|
1204
|
+
2044-02-23: 天皇誕生日
|
|
1204
1205
|
2044-03-20: 春分の日
|
|
1205
1206
|
2044-03-21: 振替休日
|
|
1206
1207
|
2044-04-29: 昭和の日
|
|
@@ -1214,11 +1215,11 @@
|
|
|
1214
1215
|
2044-10-10: 体育の日
|
|
1215
1216
|
2044-11-03: 文化の日
|
|
1216
1217
|
2044-11-23: 勤労感謝の日
|
|
1217
|
-
2044-12-23: 天皇誕生日
|
|
1218
1218
|
2045-01-01: 元日
|
|
1219
1219
|
2045-01-02: 振替休日
|
|
1220
1220
|
2045-01-09: 成人の日
|
|
1221
1221
|
2045-02-11: 建国記念の日
|
|
1222
|
+
2045-02-23: 天皇誕生日
|
|
1222
1223
|
2045-03-20: 春分の日
|
|
1223
1224
|
2045-04-29: 昭和の日
|
|
1224
1225
|
2045-05-03: 憲法記念日
|
|
@@ -1231,11 +1232,11 @@
|
|
|
1231
1232
|
2045-10-09: 体育の日
|
|
1232
1233
|
2045-11-03: 文化の日
|
|
1233
1234
|
2045-11-23: 勤労感謝の日
|
|
1234
|
-
2045-12-23: 天皇誕生日
|
|
1235
1235
|
2046-01-01: 元日
|
|
1236
1236
|
2046-01-08: 成人の日
|
|
1237
1237
|
2046-02-11: 建国記念の日
|
|
1238
1238
|
2046-02-12: 振替休日
|
|
1239
|
+
2046-02-23: 天皇誕生日
|
|
1239
1240
|
2046-03-20: 春分の日
|
|
1240
1241
|
2046-04-29: 昭和の日
|
|
1241
1242
|
2046-04-30: 振替休日
|
|
@@ -1250,11 +1251,11 @@
|
|
|
1250
1251
|
2046-10-08: 体育の日
|
|
1251
1252
|
2046-11-03: 文化の日
|
|
1252
1253
|
2046-11-23: 勤労感謝の日
|
|
1253
|
-
2046-12-23: 天皇誕生日
|
|
1254
1254
|
2046-12-24: 振替休日
|
|
1255
1255
|
2047-01-01: 元日
|
|
1256
1256
|
2047-01-14: 成人の日
|
|
1257
1257
|
2047-02-11: 建国記念の日
|
|
1258
|
+
2047-02-23: 天皇誕生日
|
|
1258
1259
|
2047-03-21: 春分の日
|
|
1259
1260
|
2047-04-29: 昭和の日
|
|
1260
1261
|
2047-05-03: 憲法記念日
|
|
@@ -1270,10 +1271,10 @@
|
|
|
1270
1271
|
2047-11-03: 文化の日
|
|
1271
1272
|
2047-11-04: 振替休日
|
|
1272
1273
|
2047-11-23: 勤労感謝の日
|
|
1273
|
-
2047-12-23: 天皇誕生日
|
|
1274
1274
|
2048-01-01: 元日
|
|
1275
1275
|
2048-01-13: 成人の日
|
|
1276
1276
|
2048-02-11: 建国記念の日
|
|
1277
|
+
2048-02-23: 天皇誕生日
|
|
1277
1278
|
2048-03-20: 春分の日
|
|
1278
1279
|
2048-04-29: 昭和の日
|
|
1279
1280
|
2048-05-03: 憲法記念日
|
|
@@ -1287,10 +1288,10 @@
|
|
|
1287
1288
|
2048-10-12: 体育の日
|
|
1288
1289
|
2048-11-03: 文化の日
|
|
1289
1290
|
2048-11-23: 勤労感謝の日
|
|
1290
|
-
2048-12-23: 天皇誕生日
|
|
1291
1291
|
2049-01-01: 元日
|
|
1292
1292
|
2049-01-11: 成人の日
|
|
1293
1293
|
2049-02-11: 建国記念の日
|
|
1294
|
+
2049-02-23: 天皇誕生日
|
|
1294
1295
|
2049-03-20: 春分の日
|
|
1295
1296
|
2049-04-29: 昭和の日
|
|
1296
1297
|
2049-05-03: 憲法記念日
|
|
@@ -1304,10 +1305,10 @@
|
|
|
1304
1305
|
2049-10-11: 体育の日
|
|
1305
1306
|
2049-11-03: 文化の日
|
|
1306
1307
|
2049-11-23: 勤労感謝の日
|
|
1307
|
-
2049-12-23: 天皇誕生日
|
|
1308
1308
|
2050-01-01: 元日
|
|
1309
1309
|
2050-01-10: 成人の日
|
|
1310
1310
|
2050-02-11: 建国記念の日
|
|
1311
|
+
2050-02-23: 天皇誕生日
|
|
1311
1312
|
2050-03-20: 春分の日
|
|
1312
1313
|
2050-03-21: 振替休日
|
|
1313
1314
|
2050-04-29: 昭和の日
|
|
@@ -1321,4 +1322,3 @@
|
|
|
1321
1322
|
2050-10-10: 体育の日
|
|
1322
1323
|
2050-11-03: 文化の日
|
|
1323
1324
|
2050-11-23: 勤労感謝の日
|
|
1324
|
-
2050-12-23: 天皇誕生日
|
data/lib/holiday_jp/holiday.rb
CHANGED
data/lib/holiday_jp/version.rb
CHANGED
data/test/test_holiday_jp.rb
CHANGED
|
@@ -19,7 +19,7 @@ class TestHolidayJp < Test::Unit::TestCase
|
|
|
19
19
|
assert_equal holidays[2].date, Date.new(2009, 1, 12)
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
-
def test_holiday?
|
|
22
|
+
def test_holiday?
|
|
23
23
|
assert HolidayJp.holiday?(Date.new(2011, 9, 19))
|
|
24
24
|
assert !HolidayJp.holiday?(Date.new(2011, 9, 18))
|
|
25
25
|
end
|
|
@@ -30,4 +30,18 @@ class TestHolidayJp < Test::Unit::TestCase
|
|
|
30
30
|
assert HolidayJp.holiday?(Date.new(year, 8, 11))
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
|
+
|
|
34
|
+
def test_emperors_birthday
|
|
35
|
+
1970.upto(1988) do |year|
|
|
36
|
+
assert HolidayJp.holiday?(Date.new(year, 4, 29))
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
1989.upto(2016) do |year|
|
|
40
|
+
assert HolidayJp.holiday?(Date.new(year, 12, 23))
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
2017.upto(2050) do |year|
|
|
44
|
+
assert HolidayJp.holiday?(Date.new(year, 2, 23))
|
|
45
|
+
end
|
|
46
|
+
end
|
|
33
47
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: holiday_jp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Masaki Komagata
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-09-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -63,6 +63,7 @@ files:
|
|
|
63
63
|
- ".gemtest"
|
|
64
64
|
- ".gitignore"
|
|
65
65
|
- ".travis.yml"
|
|
66
|
+
- CHANGELOG.md
|
|
66
67
|
- Gemfile
|
|
67
68
|
- LICENSE
|
|
68
69
|
- README.md
|
|
@@ -94,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
94
95
|
version: '0'
|
|
95
96
|
requirements: []
|
|
96
97
|
rubyforge_project: holiday_jp
|
|
97
|
-
rubygems_version: 2.
|
|
98
|
+
rubygems_version: 2.5.1
|
|
98
99
|
signing_key:
|
|
99
100
|
specification_version: 4
|
|
100
101
|
summary: Japanese Holidays.
|