fat_core 0.3.0 → 0.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab979ecd2ac34d1c729d80fff62e4bf2edc3e024
4
- data.tar.gz: 2a53dd80c0d65df335d3d238cec0c4f71d17f768
3
+ metadata.gz: 7d4ac30b4b8d6803a10f4a5e9fbf9e140fb6e333
4
+ data.tar.gz: f635f767cbe4d823d163cf795117f70ffacdaacf
5
5
  SHA512:
6
- metadata.gz: 2698c7c8bd529073b3eaf9cc9b360aa1129c126316aa05c8e0f429ebffd01e30981a8a208cf5dcb1f7b006eca1d2352cddfd5f1e28bd93934b4e2f81a4d6737f
7
- data.tar.gz: 3efee775ac480bbfe74649a70d26ffb1e0fe8c173c711f1c926647709db88596e0db38e7fa1da2cb8654c8a99fe2f064bf9dbecf2905804624a069aba198c226
6
+ metadata.gz: 701d484edc31c22eb66ef39bd80e93ac1315cb95a876c4e18c09af1ae95cb734da516ba476416445559c3a83580ac85ed023999df1fc901789b67eb84baf9258
7
+ data.tar.gz: 64cacfa65f23e61a216dda73ba47f1439bbf77828bdd5734963103e33795b18069b494aee16eeb14916aee54d96e86d11d89165be63fb68c8253d3887a4bd3f3
@@ -866,6 +866,7 @@ class Date
866
866
  end
867
867
  d
868
868
  end
869
+ alias :add_trading_days :add_nyse_business_days
869
870
 
870
871
  def next_nyse_workday
871
872
  add_nyse_business_days(1)
@@ -1,7 +1,7 @@
1
1
  module FatCore
2
2
  MAJOR = 0
3
3
  MINOR = 3
4
- PATCH = 0
4
+ PATCH = 1
5
5
 
6
6
  VERSION = [MAJOR, MINOR, PATCH].compact.join('.')
7
7
  end
@@ -853,6 +853,14 @@ describe Date do
853
853
  expect(Date.parse('2014-03-30').next_until_trading_day)
854
854
  .to eq(Date.parse('2014-03-31'))
855
855
  end
856
+
857
+ it "should be able to add n trading days" do
858
+ # Add n trading days
859
+ expect(Date.parse('2014-03-30').add_trading_days(10))
860
+ .to eq(Date.parse('2014-04-11'))
861
+ expect(Date.parse('2014-03-30').add_trading_days(-10))
862
+ .to eq(Date.parse('2014-03-17'))
863
+ end
856
864
  end
857
865
  end
858
866
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fat_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel E. Doherty