bank_working_day 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: 4ca6ca98324730b89aa4298b2cf31c0ec975bc9c
4
- data.tar.gz: 49b56e545786fcf63bb7b56179148b46e51a07d7
3
+ metadata.gz: a1b1f71afe267ee00b989a8e9619cc52c4b08477
4
+ data.tar.gz: e63f3d1968ac99ee6372ad1121ac66206f567948
5
5
  SHA512:
6
- metadata.gz: 5ea42379c7d1881fc4ae8b5acc041f30b2aad5cd0d8373d174e21245ed42feebc8035782217f9955d99bc06475aff9aef4dc9c1624711bb3224c8e35643aba9b
7
- data.tar.gz: fb76aa5610ceeddce6e90d73ab00c3c08d01e7bb9ce6c0b7d84de092e8b0ef849cbea9b3b5e2c5abdc800bc4e2394bb6fe921b3d8b05d303969c99acba86e0b7
6
+ metadata.gz: 1e6e7b387c4d44b7f32938f24694a076f319c5816f50166de53bbaba39c182f381c0e1f9aedbdefac0441e9a9399a59547c8cd88d3f9c4f2513728085f5f0ebf
7
+ data.tar.gz: 1cd40db7411ed529be8420cc023e32b0fe2a9e83d1491cdbe70d8180e5428e89889b710aedd0f95568da2a6799885278ef959566723faa5184cafbba0803ff09
@@ -1,3 +1,3 @@
1
1
  module BankWorkingDay
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -20,6 +20,15 @@ module BankWorkingDay
20
20
  date
21
21
  end
22
22
 
23
+ def self.working_day_after(date: , offset: )
24
+ offset.times do |i|
25
+ date += 1
26
+ date += 1 while holiday?(date)
27
+ end
28
+
29
+ date
30
+ end
31
+
23
32
  def self.holiday?(date)
24
33
  holidays.holiday?(date)
25
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bank_working_day
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Morioka Shuhei
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-10 00:00:00.000000000 Z
11
+ date: 2016-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler