calc_working_hours 0.3.3 → 0.3.4

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: 9cbd07c7a0797455398f0dafb2ea39b783b88ed1
4
- data.tar.gz: d622698c0dfd16edf55343fb99c2593f2d537b99
3
+ metadata.gz: 814ad2194d9d179eb81697327de9a627bcbde79f
4
+ data.tar.gz: f1b79a1c4aacfc64801a0cf5ee40f97887151136
5
5
  SHA512:
6
- metadata.gz: e125da211d060416c021fdfee13767d157ff09ad7db5a389678a8ebe9bdc2ba557901aba7ff0113f8a2ff2cf625663d2d5ae13aa145c2d423c68a75446b29b49
7
- data.tar.gz: 58cd7ee0b1593b5912f67298a6289908f5669912bf07d0837d7953cbc3355bd3fe1a9a5b7b905921dcce7403e84df8a2b20a3ba058f6f69c68d0a71ea1e6d0ce
6
+ metadata.gz: 389985bc3bf7d0b646f7c3d92cee9cd96d09e6423d2c6091d24d920aad47a0ad6435e810f234dcf250915c71679fbcf92b15b500009e162c4a8beb85623e2fc2
7
+ data.tar.gz: 5187fc9cd83834b4f7366126e21c8216c7025fa92c41294d14410a6c6b6c32032ff6b13cf12650f8a3077b1ac8a6ef332ec12a4f8b3f890c8962ce57afa0a445
@@ -15,13 +15,15 @@ module CalcWorkingHours
15
15
  end
16
16
  unless break_time.empty?
17
17
  break_time.map! do |time|
18
- unless CalcHelper.valid_time_order?(time[0], time[1])
18
+ unless CalcHelper.valid_time_order?(starting_time, time[0])
19
+ et = WorkingHours.new(time[0])
20
+ time[0] = et.add_time("24:00").time_string
21
+ end
22
+ unless CalcHelper.valid_time_order?(starting_time, time[1])
19
23
  et = WorkingHours.new(time[1])
20
24
  time[1] = et.add_time("24:00").time_string
21
- [time[0], time[1]]
22
- else
23
- [time[0], time[1]]
24
25
  end
26
+ [time[0], time[1]]
25
27
  end
26
28
  end
27
29
  end
@@ -1,3 +1,3 @@
1
1
  module CalcWorkingHours
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calc_working_hours
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi_U