opening_hours_converter 1.13.0 → 1.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/opening_hours_converter/iterator.rb +7 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eea3348ad8b93b702b1e932b2be1b7e8134bf40613d12d1f7b14922bfd5a4b8f
|
4
|
+
data.tar.gz: 7ecdd6c41d2aa1cb977401b381f30344674edd9c327b74bc882902415d7630ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40b00f35eb69fc9631d87cf0a34e067c2ba0fe0d163beef982c955b03a9c744d1f609e6241e3c08554bc7a54c86351dcb042160b2b84a5367cc626f81bd80856
|
7
|
+
data.tar.gz: bf04a34d12472137d017f9f0359bdd476068faf4a0978123c283cc4118cd3a917b9205acd7528baa7d0f7b2ef36da66f711d21314acf5e631728f5a454651abf
|
@@ -67,6 +67,7 @@ module OpeningHoursConverter
|
|
67
67
|
date_ranges.each do |dr|
|
68
68
|
is_ph = true if dr.is_holiday?
|
69
69
|
end
|
70
|
+
|
70
71
|
date_ranges_array = get_iterator(date_ranges)
|
71
72
|
datetime_result = []
|
72
73
|
|
@@ -79,9 +80,12 @@ module OpeningHoursConverter
|
|
79
80
|
end
|
80
81
|
date_ranges[index].typical.intervals.each do |i|
|
81
82
|
next unless !i.nil? && !i.is_off
|
82
|
-
|
83
|
-
|
84
|
-
|
83
|
+
|
84
|
+
if date_ranges[index].typical.is_a? Week
|
85
|
+
next unless (i.day_start..i.day_end).cover?(reindex_sunday_week_to_monday_week(day.wday)) || (is_ph && year_ph.include?(Time.new(day.year, day.month, day.day)))
|
86
|
+
end
|
87
|
+
|
88
|
+
itr = { start: Time.new(day.year, day.month, day.day, i.start / 60, i.start % 60), end: Time.new(day.year, day.month, day.day, i.end / 60, i.end % 60) }
|
85
89
|
datetime_result << itr unless datetime_result.include?(itr)
|
86
90
|
end
|
87
91
|
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.
|
4
|
+
version: 1.13.1
|
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-
|
11
|
+
date: 2019-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|