stock_market_days 1.1.1 → 1.1.3

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: 94edfa2a6d5b3410f856de1d32c246ff87b51cf4d3b74e89e1676a2ed2a59d57
4
- data.tar.gz: aa89e3e52a0538fd2aac5e4af6f237f454ec37931ba8fdb263faf30640a7431d
3
+ metadata.gz: 55e734a319706844412c3aa8b4bb90185a4e2ca879946ddb34beec276d139f7d
4
+ data.tar.gz: 7f8b91d99c626293323a4c9cf1f57e8f07e09eedacd9f85f7c231f7bbf094dec
5
5
  SHA512:
6
- metadata.gz: 2eb4b581e6609621dd4b5745afddd41775af35350c6285f478cce54b6c43f4e440854a986d748147c049091442e4c62a5bb3750ac5b40a1e09d81c7470350d5d
7
- data.tar.gz: a5e02e9d9864a96ba20eb9440a0730d81f6fa0ed6cfac683b1cc5956bf9dfc121f808a0f0c7647807db1692e6d1e4166622311df65e0eb771bfe97e3d6acdcd3
6
+ metadata.gz: 7b7e188ee4d06846612654246b52d1783820975d7d03deb63dc74433c4b4b3ab40b383932926afba20bf3aab2faab60ee3090e1a7f3a46323e4ef0f876b29a8d
7
+ data.tar.gz: 8cf48b6f8f54a955f71c4ec90414801768d0232e5077cfa4ab5d6e130b33cee8e6e9b71d7927a7b5c5ddb7458187721e3ee33d644c7db0dff742b3288bdc5c7e
@@ -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,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'stock_market_days/utility_methods'
2
4
 
3
5
  module StockMarketDays
@@ -8,7 +10,7 @@ module StockMarketDays
8
10
 
9
11
  def initialize(market_days_file)
10
12
  file_contents = File.open(market_days_file).read
11
- @market_days_list = file_contents.split("\n").map { |date_s| Date.parse(date_s) }
13
+ @market_days_list = file_contents.split("\n").map { |date_s| Date.strptime(date_s, '%Y-%m-%d') }
12
14
  end
13
15
 
14
16
  def is_market_day?(date=Date.today)
@@ -1,3 +1,3 @@
1
1
  module StockMarketDays
2
- VERSION = '1.1.1'
3
- end
2
+ VERSION = '1.1.3'
3
+ 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.1
4
+ version: 1.1.3
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-05-22 00:00:00.000000000 Z
11
+ date: 2024-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler