stock_market_days 1.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c34e21fade70fd07272a1dd780b5e6abe7eabddbe0a024e71164c7289384963
4
- data.tar.gz: fd6452c7aa2468c8b4e5e65e4648eab5e6276778e93f0c595d024a85058ac7d7
3
+ metadata.gz: 94a9949aced23cb51da7cb4ec329e08b0f6a20af566b770bd71c5fe3d8c6a6d1
4
+ data.tar.gz: b4b4fc2ff915c2f36b73974a91e61f6e5a672124a74d6dac0360de1d792fdf11
5
5
  SHA512:
6
- metadata.gz: eb251f60a4d040d96d8202f6b8759c587de43cf00d0ad6b49834929b877bf0206f385b16419102b2df12e8d301a467efb62e51cf197070a98b0438a7dc6d7346
7
- data.tar.gz: edcea552170bc39ae84ac3a7502890540c2f3532fd88e137a16579d4258e81f4285e5fed11cd2c26e0277ec0853d31e2960787d29d22655f9b9e0bf096a54454
6
+ metadata.gz: 1a39aa6f5543811ec0dd0e13d57e97f639d05cfe20bcde5e9e90b3fda647f420ab0a5decafa954bb13b27be236438b964ad9423165f3562adf9bc957824bc8a4
7
+ data.tar.gz: 120cdf30630d1180307529497e49c39b1da5ff32ad46e366158d6204be1bf17b92d264851bb1fcc129df4b537c40b48efe1e0dd9348321c4b3dd3d771784f41e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ Version 1.2.0 (8/26/2024)
2
+ * Several date corrections on future market days (thanks to the community)
3
+ * Improved benchmarks on date calculation
4
+ * Added `previous_market_day` method
5
+
1
6
  Version 1.1.1 (5/22/2024)
2
7
  * A few historical date corrections
3
8
 
@@ -5,4 +10,4 @@ Version 1.1.0 (6/19/2022)
5
10
  * Adjusted market days for new Juneteenth federal holiday
6
11
 
7
12
  Version 1.0.1 (12/30/2019)
8
- * Fixed bug where methods were not calling properly when including StockMarketDays as a mixin
13
+ * Fixed bug where methods were not calling properly when including StockMarketDays as a mixin
@@ -3187,7 +3187,6 @@
3187
3187
  2026-09-02
3188
3188
  2026-09-03
3189
3189
  2026-09-04
3190
- 2026-09-07
3191
3190
  2026-09-08
3192
3191
  2026-09-09
3193
3192
  2026-09-10
@@ -1,3 +1,3 @@
1
1
  module StockMarketDays
2
- VERSION = '1.1.2'
2
+ VERSION = '1.2.0'
3
3
  end
@@ -23,4 +23,8 @@ module StockMarketDays
23
23
  @@default_calculator.market_days_from(from_date, 1)
24
24
  end
25
25
 
26
+ def previous_market_day(from_date=Date.today)
27
+ @@default_calculator.market_days_from(from_date, -1)
28
+ end
29
+
26
30
  end
@@ -62,6 +62,12 @@ describe StockMarketDays do
62
62
  end
63
63
  end
64
64
 
65
+ context 'is Labor Day' do
66
+ let(:date) { Date.new(2026,9,7) }
67
+
68
+ it { is_expected.to be_falsey }
69
+ end
70
+
65
71
  context 'is Thanksgiving' do
66
72
  let(:dates) do
67
73
  [
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.1.2
4
+ version: 1.2.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: 2024-08-25 00:00:00.000000000 Z
11
+ date: 2024-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler