opening_hours_converter 1.13.1 → 1.13.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eea3348ad8b93b702b1e932b2be1b7e8134bf40613d12d1f7b14922bfd5a4b8f
4
- data.tar.gz: 7ecdd6c41d2aa1cb977401b381f30344674edd9c327b74bc882902415d7630ec
3
+ metadata.gz: 5aa7ed3fc16e0f5cdb8c559d39110ff4bedab00ad1893acc64dac3f8db02d05e
4
+ data.tar.gz: '0098190bb92ac2846506f023d7ab964c0fe6e59f30bbf536dd9b3925c3b4c09f'
5
5
  SHA512:
6
- metadata.gz: 40b00f35eb69fc9631d87cf0a34e067c2ba0fe0d163beef982c955b03a9c744d1f609e6241e3c08554bc7a54c86351dcb042160b2b84a5367cc626f81bd80856
7
- data.tar.gz: bf04a34d12472137d017f9f0359bdd476068faf4a0978123c283cc4118cd3a917b9205acd7528baa7d0f7b2ef36da66f711d21314acf5e631728f5a454651abf
6
+ metadata.gz: 7f052b71983f7ab81256ac3e6170e5e9d7eb7c12f0998cd078839beba70c0a05ffbc45be631137749d67a94137d7e99f1b764239acd7fee53b7726ca1a2babde
7
+ data.tar.gz: ceea79dad4398356b4902d8eee5415870211cd16b4992232099ffb01dae02b95ff0333db8088ca1decee1bd50b9fa0a8ac691ff3279f3a2ecaafc7518ad68645
@@ -11,6 +11,7 @@ module OpeningHoursConverter
11
11
 
12
12
  date_ranges.each do |date_range|
13
13
  years = OpeningHoursConverter::Year.build_day_array_from_date_range(date_range, true)
14
+
14
15
  result = []
15
16
 
16
17
  year_start = -1
@@ -25,7 +26,6 @@ module OpeningHoursConverter
25
26
  month_start = month
26
27
  day_start = day
27
28
  elsif day_bool && year_start >= 0 && month == 11 && day == 30 && years[year + 1].nil?
28
-
29
29
  result << { start: DateTime.new(year_start, month_start + 1, day_start + 1), end: DateTime.new(year, 12, 31) }
30
30
 
31
31
  year_start = -1
@@ -39,9 +39,8 @@ module OpeningHoursConverter
39
39
  DateTime.new(year - 1, 12, 31)
40
40
  else
41
41
  DateTime.new(year, month, MONTH_END_DAY[month - 1])
42
- end
42
+ end
43
43
  else
44
-
45
44
  DateTime.new(year, month + 1, day)
46
45
  end
47
46
 
@@ -50,6 +49,11 @@ module OpeningHoursConverter
50
49
  month_start = -1
51
50
  day_start = -1
52
51
  end
52
+
53
+ if day_bool && year_start >= 0 && month == 11 && day == 30 && years[year + 1].nil?
54
+ result << { start: DateTime.new(year_start, month_start + 1, day_start + 1), end: DateTime.new(year, 12, 31) }
55
+ end
56
+
53
57
  end
54
58
  end
55
59
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opening_hours_converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.1
4
+ version: 1.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ziserman Martin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-13 00:00:00.000000000 Z
11
+ date: 2019-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json