stock_market_days 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +3 -0
- data/lib/market_open_days/nyse_market_days.csv +2 -38
- data/lib/stock_market_days/version.rb +1 -1
- data/spec/stock_market_days/stock_market_days_spec.rb +17 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29c0b8d6c03e6fa5c802e1c81744d1c055435af893ebc955af02101e14a5b59c
|
4
|
+
data.tar.gz: 1b33d7255735e66b1d1918e98a885dda2694e20757c0e63078a20922b10a7ce9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bc256e5760d3c9363cdd6530dc1ae75b79ed237fad53ea85d143c568d83405482c53c13983f138e9d8cf6039c133579fa92c976abf98176bfdf50d0497b062b
|
7
|
+
data.tar.gz: 6a344ca271f8fa390e2e81455d25ef88feab9fd070026b02d0e47002fd35ae8143f099c5b4ca301dbe641ab11184b996b44d3bb2d0d210839a153a9f7fef8d36
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
pkg/
|
data/CHANGELOG.md
CHANGED
@@ -2018,6 +2018,7 @@
|
|
2018
2018
|
2021-12-29
|
2019
2019
|
2021-12-30
|
2020
2020
|
2021-12-31
|
2021
|
+
2022-01-03
|
2021
2022
|
2022-01-04
|
2022
2023
|
2022-01-05
|
2023
2024
|
2022-01-06
|
@@ -2133,7 +2134,6 @@
|
|
2133
2134
|
2022-06-15
|
2134
2135
|
2022-06-16
|
2135
2136
|
2022-06-17
|
2136
|
-
2022-06-20
|
2137
2137
|
2022-06-21
|
2138
2138
|
2022-06-22
|
2139
2139
|
2022-06-23
|
@@ -2384,7 +2384,6 @@
|
|
2384
2384
|
2023-06-14
|
2385
2385
|
2023-06-15
|
2386
2386
|
2023-06-16
|
2387
|
-
2023-06-19
|
2388
2387
|
2023-06-20
|
2389
2388
|
2023-06-21
|
2390
2389
|
2023-06-22
|
@@ -2637,7 +2636,6 @@
|
|
2637
2636
|
2024-06-14
|
2638
2637
|
2024-06-17
|
2639
2638
|
2024-06-18
|
2640
|
-
2024-06-19
|
2641
2639
|
2024-06-20
|
2642
2640
|
2024-06-21
|
2643
2641
|
2024-06-24
|
@@ -2889,7 +2887,6 @@
|
|
2889
2887
|
2025-06-16
|
2890
2888
|
2025-06-17
|
2891
2889
|
2025-06-18
|
2892
|
-
2025-06-19
|
2893
2890
|
2025-06-20
|
2894
2891
|
2025-06-23
|
2895
2892
|
2025-06-24
|
@@ -3141,7 +3138,6 @@
|
|
3141
3138
|
2026-06-16
|
3142
3139
|
2026-06-17
|
3143
3140
|
2026-06-18
|
3144
|
-
2026-06-19
|
3145
3141
|
2026-06-22
|
3146
3142
|
2026-06-23
|
3147
3143
|
2026-06-24
|
@@ -3393,7 +3389,6 @@
|
|
3393
3389
|
2027-06-15
|
3394
3390
|
2027-06-16
|
3395
3391
|
2027-06-17
|
3396
|
-
2027-06-18
|
3397
3392
|
2027-06-21
|
3398
3393
|
2027-06-22
|
3399
3394
|
2027-06-23
|
@@ -3645,7 +3640,6 @@
|
|
3645
3640
|
2028-06-14
|
3646
3641
|
2028-06-15
|
3647
3642
|
2028-06-16
|
3648
|
-
2028-06-19
|
3649
3643
|
2028-06-20
|
3650
3644
|
2028-06-21
|
3651
3645
|
2028-06-22
|
@@ -3897,7 +3891,6 @@
|
|
3897
3891
|
2029-06-14
|
3898
3892
|
2029-06-15
|
3899
3893
|
2029-06-18
|
3900
|
-
2029-06-19
|
3901
3894
|
2029-06-20
|
3902
3895
|
2029-06-21
|
3903
3896
|
2029-06-22
|
@@ -4149,7 +4142,6 @@
|
|
4149
4142
|
2030-06-14
|
4150
4143
|
2030-06-17
|
4151
4144
|
2030-06-18
|
4152
|
-
2030-06-19
|
4153
4145
|
2030-06-20
|
4154
4146
|
2030-06-21
|
4155
4147
|
2030-06-24
|
@@ -4401,7 +4393,6 @@
|
|
4401
4393
|
2031-06-16
|
4402
4394
|
2031-06-17
|
4403
4395
|
2031-06-18
|
4404
|
-
2031-06-19
|
4405
4396
|
2031-06-20
|
4406
4397
|
2031-06-23
|
4407
4398
|
2031-06-24
|
@@ -4653,7 +4644,6 @@
|
|
4653
4644
|
2032-06-15
|
4654
4645
|
2032-06-16
|
4655
4646
|
2032-06-17
|
4656
|
-
2032-06-18
|
4657
4647
|
2032-06-21
|
4658
4648
|
2032-06-22
|
4659
4649
|
2032-06-23
|
@@ -4905,7 +4895,6 @@
|
|
4905
4895
|
2033-06-15
|
4906
4896
|
2033-06-16
|
4907
4897
|
2033-06-17
|
4908
|
-
2033-06-20
|
4909
4898
|
2033-06-21
|
4910
4899
|
2033-06-22
|
4911
4900
|
2033-06-23
|
@@ -5156,7 +5145,6 @@
|
|
5156
5145
|
2034-06-14
|
5157
5146
|
2034-06-15
|
5158
5147
|
2034-06-16
|
5159
|
-
2034-06-19
|
5160
5148
|
2034-06-20
|
5161
5149
|
2034-06-21
|
5162
5150
|
2034-06-22
|
@@ -5408,7 +5396,6 @@
|
|
5408
5396
|
2035-06-14
|
5409
5397
|
2035-06-15
|
5410
5398
|
2035-06-18
|
5411
|
-
2035-06-19
|
5412
5399
|
2035-06-20
|
5413
5400
|
2035-06-21
|
5414
5401
|
2035-06-22
|
@@ -5661,7 +5648,6 @@
|
|
5661
5648
|
2036-06-16
|
5662
5649
|
2036-06-17
|
5663
5650
|
2036-06-18
|
5664
|
-
2036-06-19
|
5665
5651
|
2036-06-20
|
5666
5652
|
2036-06-23
|
5667
5653
|
2036-06-24
|
@@ -5913,7 +5899,6 @@
|
|
5913
5899
|
2037-06-16
|
5914
5900
|
2037-06-17
|
5915
5901
|
2037-06-18
|
5916
|
-
2037-06-19
|
5917
5902
|
2037-06-22
|
5918
5903
|
2037-06-23
|
5919
5904
|
2037-06-24
|
@@ -6165,7 +6150,6 @@
|
|
6165
6150
|
2038-06-15
|
6166
6151
|
2038-06-16
|
6167
6152
|
2038-06-17
|
6168
|
-
2038-06-18
|
6169
6153
|
2038-06-21
|
6170
6154
|
2038-06-22
|
6171
6155
|
2038-06-23
|
@@ -6417,7 +6401,6 @@
|
|
6417
6401
|
2039-06-15
|
6418
6402
|
2039-06-16
|
6419
6403
|
2039-06-17
|
6420
|
-
2039-06-20
|
6421
6404
|
2039-06-21
|
6422
6405
|
2039-06-22
|
6423
6406
|
2039-06-23
|
@@ -6669,7 +6652,6 @@
|
|
6669
6652
|
2040-06-14
|
6670
6653
|
2040-06-15
|
6671
6654
|
2040-06-18
|
6672
|
-
2040-06-19
|
6673
6655
|
2040-06-20
|
6674
6656
|
2040-06-21
|
6675
6657
|
2040-06-22
|
@@ -6921,7 +6903,6 @@
|
|
6921
6903
|
2041-06-14
|
6922
6904
|
2041-06-17
|
6923
6905
|
2041-06-18
|
6924
|
-
2041-06-19
|
6925
6906
|
2041-06-20
|
6926
6907
|
2041-06-21
|
6927
6908
|
2041-06-24
|
@@ -7173,7 +7154,6 @@
|
|
7173
7154
|
2042-06-16
|
7174
7155
|
2042-06-17
|
7175
7156
|
2042-06-18
|
7176
|
-
2042-06-19
|
7177
7157
|
2042-06-20
|
7178
7158
|
2042-06-23
|
7179
7159
|
2042-06-24
|
@@ -7425,7 +7405,6 @@
|
|
7425
7405
|
2043-06-16
|
7426
7406
|
2043-06-17
|
7427
7407
|
2043-06-18
|
7428
|
-
2043-06-19
|
7429
7408
|
2043-06-22
|
7430
7409
|
2043-06-23
|
7431
7410
|
2043-06-24
|
@@ -7678,7 +7657,6 @@
|
|
7678
7657
|
2044-06-15
|
7679
7658
|
2044-06-16
|
7680
7659
|
2044-06-17
|
7681
|
-
2044-06-20
|
7682
7660
|
2044-06-21
|
7683
7661
|
2044-06-22
|
7684
7662
|
2044-06-23
|
@@ -7929,7 +7907,6 @@
|
|
7929
7907
|
2045-06-14
|
7930
7908
|
2045-06-15
|
7931
7909
|
2045-06-16
|
7932
|
-
2045-06-19
|
7933
7910
|
2045-06-20
|
7934
7911
|
2045-06-21
|
7935
7912
|
2045-06-22
|
@@ -8181,7 +8158,6 @@
|
|
8181
8158
|
2046-06-14
|
8182
8159
|
2046-06-15
|
8183
8160
|
2046-06-18
|
8184
|
-
2046-06-19
|
8185
8161
|
2046-06-20
|
8186
8162
|
2046-06-21
|
8187
8163
|
2046-06-22
|
@@ -8433,7 +8409,6 @@
|
|
8433
8409
|
2047-06-14
|
8434
8410
|
2047-06-17
|
8435
8411
|
2047-06-18
|
8436
|
-
2047-06-19
|
8437
8412
|
2047-06-20
|
8438
8413
|
2047-06-21
|
8439
8414
|
2047-06-24
|
@@ -8686,7 +8661,6 @@
|
|
8686
8661
|
2048-06-16
|
8687
8662
|
2048-06-17
|
8688
8663
|
2048-06-18
|
8689
|
-
2048-06-19
|
8690
8664
|
2048-06-22
|
8691
8665
|
2048-06-23
|
8692
8666
|
2048-06-24
|
@@ -8938,7 +8912,6 @@
|
|
8938
8912
|
2049-06-15
|
8939
8913
|
2049-06-16
|
8940
8914
|
2049-06-17
|
8941
|
-
2049-06-18
|
8942
8915
|
2049-06-21
|
8943
8916
|
2049-06-22
|
8944
8917
|
2049-06-23
|
@@ -9190,7 +9163,6 @@
|
|
9190
9163
|
2050-06-15
|
9191
9164
|
2050-06-16
|
9192
9165
|
2050-06-17
|
9193
|
-
2050-06-20
|
9194
9166
|
2050-06-21
|
9195
9167
|
2050-06-22
|
9196
9168
|
2050-06-23
|
@@ -9441,7 +9413,6 @@
|
|
9441
9413
|
2051-06-14
|
9442
9414
|
2051-06-15
|
9443
9415
|
2051-06-16
|
9444
|
-
2051-06-19
|
9445
9416
|
2051-06-20
|
9446
9417
|
2051-06-21
|
9447
9418
|
2051-06-22
|
@@ -9694,7 +9665,6 @@
|
|
9694
9665
|
2052-06-14
|
9695
9666
|
2052-06-17
|
9696
9667
|
2052-06-18
|
9697
|
-
2052-06-19
|
9698
9668
|
2052-06-20
|
9699
9669
|
2052-06-21
|
9700
9670
|
2052-06-24
|
@@ -9946,7 +9916,6 @@
|
|
9946
9916
|
2053-06-16
|
9947
9917
|
2053-06-17
|
9948
9918
|
2053-06-18
|
9949
|
-
2053-06-19
|
9950
9919
|
2053-06-20
|
9951
9920
|
2053-06-23
|
9952
9921
|
2053-06-24
|
@@ -10198,7 +10167,6 @@
|
|
10198
10167
|
2054-06-16
|
10199
10168
|
2054-06-17
|
10200
10169
|
2054-06-18
|
10201
|
-
2054-06-19
|
10202
10170
|
2054-06-22
|
10203
10171
|
2054-06-23
|
10204
10172
|
2054-06-24
|
@@ -10450,7 +10418,6 @@
|
|
10450
10418
|
2055-06-15
|
10451
10419
|
2055-06-16
|
10452
10420
|
2055-06-17
|
10453
|
-
2055-06-18
|
10454
10421
|
2055-06-21
|
10455
10422
|
2055-06-22
|
10456
10423
|
2055-06-23
|
@@ -10702,7 +10669,6 @@
|
|
10702
10669
|
2056-06-14
|
10703
10670
|
2056-06-15
|
10704
10671
|
2056-06-16
|
10705
|
-
2056-06-19
|
10706
10672
|
2056-06-20
|
10707
10673
|
2056-06-21
|
10708
10674
|
2056-06-22
|
@@ -10954,7 +10920,6 @@
|
|
10954
10920
|
2057-06-14
|
10955
10921
|
2057-06-15
|
10956
10922
|
2057-06-18
|
10957
|
-
2057-06-19
|
10958
10923
|
2057-06-20
|
10959
10924
|
2057-06-21
|
10960
10925
|
2057-06-22
|
@@ -11206,7 +11171,6 @@
|
|
11206
11171
|
2058-06-14
|
11207
11172
|
2058-06-17
|
11208
11173
|
2058-06-18
|
11209
|
-
2058-06-19
|
11210
11174
|
2058-06-20
|
11211
11175
|
2058-06-21
|
11212
11176
|
2058-06-24
|
@@ -11341,4 +11305,4 @@
|
|
11341
11305
|
2058-12-26
|
11342
11306
|
2058-12-27
|
11343
11307
|
2058-12-30
|
11344
|
-
2058-12-31
|
11308
|
+
2058-12-31
|
@@ -45,6 +45,23 @@ describe StockMarketDays do
|
|
45
45
|
it { is_expected.to be_falsey }
|
46
46
|
end
|
47
47
|
|
48
|
+
context 'is Juneteenth' do
|
49
|
+
let(:dates) do
|
50
|
+
[
|
51
|
+
Date.new(2022,6,19), # Sunday
|
52
|
+
Date.new(2022,6,20), # Monday (holiday falls on Sunday)
|
53
|
+
Date.new(2022,6,19), # Wednesday
|
54
|
+
Date.new(2027,6,18) # Friday (holiday falls on Saturday)
|
55
|
+
]
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'reports market closed on the holiday, or nearest Friday/Monday if on the weekend' do
|
59
|
+
dates.each do |market_closed_day|
|
60
|
+
expect(described_class.is_market_day?(market_closed_day)).to be_falsey
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
48
65
|
context 'is Thanksgiving' do
|
49
66
|
let(:date) { Date.new(2023,11,23) }
|
50
67
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stock_market_days
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Winston Kotzan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -101,6 +101,7 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
+
- ".gitignore"
|
104
105
|
- ".rspec"
|
105
106
|
- CHANGELOG.md
|
106
107
|
- Gemfile
|
@@ -137,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
138
|
- !ruby/object:Gem::Version
|
138
139
|
version: '0'
|
139
140
|
requirements: []
|
140
|
-
rubygems_version: 3.
|
141
|
+
rubygems_version: 3.3.7
|
141
142
|
signing_key:
|
142
143
|
specification_version: 4
|
143
144
|
summary: A gem for determining the days that the stock market is open
|