calc_working_hours 0.3.2 → 0.3.3

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: 0047ebcca2b690bd15b5398b9459ebbd465ab178
4
- data.tar.gz: e1e1c511a76a51aea4bc1e631b0ce5a5603b76f4
3
+ metadata.gz: 9cbd07c7a0797455398f0dafb2ea39b783b88ed1
4
+ data.tar.gz: d622698c0dfd16edf55343fb99c2593f2d537b99
5
5
  SHA512:
6
- metadata.gz: 282823665e7a2b62047210bdc7b9385c28e6775d34e00d5c5790eecddd8bd6f8cf0b91f4ea7a5b9e55019b7b0a5926e3e9e23d5c36356c370a174eedd0d55b93
7
- data.tar.gz: 0b065bef664a247d9dbfdf17ecc8e1f7e158e5eed338d049ca9b8a51958fdd9670e01106ba011684df1faffb46c9e51f301f9b35d741e1be89d7945b4f8f1274
6
+ metadata.gz: e125da211d060416c021fdfee13767d157ff09ad7db5a389678a8ebe9bdc2ba557901aba7ff0113f8a2ff2cf625663d2d5ae13aa145c2d423c68a75446b29b49
7
+ data.tar.gz: 58cd7ee0b1593b5912f67298a6289908f5669912bf07d0837d7953cbc3355bd3fe1a9a5b7b905921dcce7403e84df8a2b20a3ba058f6f69c68d0a71ea1e6d0ce
@@ -13,6 +13,17 @@ module CalcWorkingHours
13
13
  et = WorkingHours.new(ending_time)
14
14
  ending_time = et.add_time("24:00").time_string
15
15
  end
16
+ unless break_time.empty?
17
+ break_time.map! do |time|
18
+ unless CalcHelper.valid_time_order?(time[0], time[1])
19
+ et = WorkingHours.new(time[1])
20
+ time[1] = et.add_time("24:00").time_string
21
+ [time[0], time[1]]
22
+ else
23
+ [time[0], time[1]]
24
+ end
25
+ end
26
+ end
16
27
  end
17
28
 
18
29
  unless date_string.class == String
@@ -1,3 +1,3 @@
1
1
  module CalcWorkingHours
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
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.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi_U