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 +4 -4
- data/lib/bank_working_day/version.rb +1 -1
- data/lib/bank_working_day.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1b1f71afe267ee00b989a8e9619cc52c4b08477
|
4
|
+
data.tar.gz: e63f3d1968ac99ee6372ad1121ac66206f567948
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e6e7b387c4d44b7f32938f24694a076f319c5816f50166de53bbaba39c182f381c0e1f9aedbdefac0441e9a9399a59547c8cd88d3f9c4f2513728085f5f0ebf
|
7
|
+
data.tar.gz: 1cd40db7411ed529be8420cc023e32b0fe2a9e83d1491cdbe70d8180e5428e89889b710aedd0f95568da2a6799885278ef959566723faa5184cafbba0803ff09
|
data/lib/bank_working_day.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2016-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|