biz 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/biz/time.rb +7 -1
- data/lib/biz/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d16f3fcb143fead794e794f17195778043ff611
|
4
|
+
data.tar.gz: 4958afc77a8fddaa749a543c353d88209a213e35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b70ed92768f8ae067bcb6cbf3c5f837682555879a92e84a805f6b5d0311a18867523f0d4d01b2f57f72b8d7e5385639f46542f77a636a848c9b83ed2c58a43c5
|
7
|
+
data.tar.gz: 5d5ad52048db8ad7d800edbb05c4162f0ed311a8d45fd0596b157fcb098d1dd462c51f8362b9ed10c2afe72c6ad0d76eb2a7527d4cd3519f982c37fcc60822e5
|
data/lib/biz/time.rb
CHANGED
@@ -12,6 +12,7 @@ module Biz
|
|
12
12
|
|
13
13
|
MINUTES_IN_DAY = MINUTES_IN_HOUR * HOURS_IN_DAY
|
14
14
|
MINUTES_IN_WEEK = MINUTES_IN_DAY * DAYS_IN_WEEK
|
15
|
+
SECONDS_IN_DAY = MINUTES_IN_DAY * 60
|
15
16
|
|
16
17
|
BIG_BANG = ::Time.new(-10**100)
|
17
18
|
HEAT_DEATH = ::Time.new(10**100)
|
@@ -39,7 +40,12 @@ module Biz
|
|
39
40
|
true
|
40
41
|
)
|
41
42
|
rescue TZInfo::PeriodNotFound
|
42
|
-
|
43
|
+
next_day_second = day_time.day_second + HOUR
|
44
|
+
if next_day_second > SECONDS_IN_DAY
|
45
|
+
on_date(date + 1, DayTime.new(next_day_second % SECONDS_IN_DAY))
|
46
|
+
else
|
47
|
+
on_date(date, DayTime.new(next_day_second))
|
48
|
+
end
|
43
49
|
end
|
44
50
|
|
45
51
|
def during_week(week, week_time)
|
data/lib/biz/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: biz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Craig Little
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-10-
|
12
|
+
date: 2015-10-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: abstract_type
|
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
178
|
version: '0'
|
179
179
|
requirements: []
|
180
180
|
rubyforge_project:
|
181
|
-
rubygems_version: 2.
|
181
|
+
rubygems_version: 2.2.2
|
182
182
|
signing_key:
|
183
183
|
specification_version: 4
|
184
184
|
summary: Business hours calculations
|