business_time 0.7.6 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +2 -2
- data/lib/business_time.rb +2 -1
- data/lib/business_time/business_hours.rb +1 -1
- data/lib/business_time/core_ext/{fixnum.rb → integer.rb} +2 -2
- data/lib/business_time/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7dc74d9cffafd72acce648d07bdceed471344dfd
|
4
|
+
data.tar.gz: 6394c590be260dddde6c2738090cf00c03060368
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0321b6695f50318379b00423f54aca445eb53a5b1c2ee9b1ba1a164a442f4090c56bd6a541a00e3b527bc80ab4f0ba139e407aa6f12e84b445afe7958885692
|
7
|
+
data.tar.gz: 633875c242cb89ae62ec2d9e2361ff16e7b2b91ad5216c7b2198f36d1631eaa4f33f502b86f4d13b05ba5fc77e34c76c398706d403c70024f84cef17c0940834
|
data/README.rdoc
CHANGED
@@ -147,12 +147,11 @@ and some complexities (bugs?) in the timeWithZone class, this was harder than ex
|
|
147
147
|
preserved and the beginning and end of times for the business day are
|
148
148
|
referenced in that time zone.
|
149
149
|
|
150
|
-
This can lead to some
|
150
|
+
This can lead to some weird looking effects if, say, you are in the Eastern time zone but doing everything in UTC times...
|
151
151
|
Your business day will appear to start and end at 9:00 and 5:00 UTC.
|
152
152
|
If this seems perplexing to you, I can almost guarantee you are in over your head with timezones in other ways too,
|
153
153
|
this is just the first place you encountered it.
|
154
154
|
Timezone relative date handling gets more and more complicated every time you look at it and takes a long time before it starts to seem simple again.
|
155
|
-
I'm hoping Arild and I write some good blog entries on the subject at http://blog.codesherpas.com.
|
156
155
|
|
157
156
|
== Integration with the Holidays gem
|
158
157
|
|
@@ -189,6 +188,7 @@ I'm hoping Arild and I write some good blog entries on the subject at http://blo
|
|
189
188
|
* Glenn Vanderburg http://github.com/glv
|
190
189
|
* Michael Grosser http://github.com/grosser
|
191
190
|
* Michael Curtis http://github.com/mcurtis
|
191
|
+
* Brian Ewins http://github.com/bazzargh
|
192
192
|
|
193
193
|
(Special thanks for Arild on the complexities of dealing with TimeWithZone)
|
194
194
|
|
data/lib/business_time.rb
CHANGED
@@ -4,10 +4,11 @@ require 'active_support/time'
|
|
4
4
|
require 'time'
|
5
5
|
require 'yaml'
|
6
6
|
|
7
|
+
require 'business_time/version'
|
7
8
|
require 'business_time/config'
|
8
9
|
require 'business_time/business_hours'
|
9
10
|
require 'business_time/business_days'
|
10
|
-
require 'business_time/core_ext/
|
11
|
+
require 'business_time/core_ext/integer'
|
11
12
|
|
12
13
|
require 'business_time/time_extensions'
|
13
14
|
require 'business_time/core_ext/date'
|
@@ -60,7 +60,7 @@ module BusinessTime
|
|
60
60
|
|
61
61
|
# Due to the 23:59:59 end-of-workday exception
|
62
62
|
time_roll_backward = Time.roll_backward(before_time)
|
63
|
-
time_roll_backward += 1.second if time_roll_backward.
|
63
|
+
time_roll_backward += 1.second if time_roll_backward.iso8601 =~ /23:59:59/
|
64
64
|
|
65
65
|
before_time = time_roll_backward - delta
|
66
66
|
end
|
@@ -1,9 +1,9 @@
|
|
1
|
-
# hook into
|
1
|
+
# hook into Integer so we can say things like:
|
2
2
|
# 5.business_hours.from_now
|
3
3
|
# 7.business_days.ago
|
4
4
|
# 3.business_days.after(some_date)
|
5
5
|
# 4.business_hours.before(some_date_time)
|
6
|
-
class
|
6
|
+
class Integer
|
7
7
|
def business_hours
|
8
8
|
BusinessTime::BusinessHours.new(self)
|
9
9
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: business_time
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bokmann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 4.2.8
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 4.2.8
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: tzinfo
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,7 +109,7 @@ files:
|
|
109
109
|
- lib/business_time/config.rb
|
110
110
|
- lib/business_time/core_ext/active_support/time_with_zone.rb
|
111
111
|
- lib/business_time/core_ext/date.rb
|
112
|
-
- lib/business_time/core_ext/
|
112
|
+
- lib/business_time/core_ext/integer.rb
|
113
113
|
- lib/business_time/core_ext/time.rb
|
114
114
|
- lib/business_time/time_extensions.rb
|
115
115
|
- lib/business_time/version.rb
|
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
139
|
rubyforge_project:
|
140
|
-
rubygems_version: 2.
|
140
|
+
rubygems_version: 2.6.11
|
141
141
|
signing_key:
|
142
142
|
specification_version: 4
|
143
143
|
summary: Support for doing time math in business hours and days
|