opening_hours_converter 1.13.11 → 1.13.12
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6f7598eeb7cb6738f017cf1a785eb5afddcc90717575a5a489d3c4d797579988
|
|
4
|
+
data.tar.gz: 7ec00410febbdb1faa8c801dc23d1ab826a5d36035a449bfcd5df96475391ae0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 39efeed6fd42120adb95e32505c5654bc8ddea7471d612aea2f1051856b20dcdda5bced0678374c09f9c9f9c922dab8c3b755719fba6610d84b8bb1c40c7c9c1
|
|
7
|
+
data.tar.gz: b5d8e74cb8320c6d97a6690a8969bc5fafebef332c14885712321c37a49265c676eec278c9727497df0695fad7f0b52afda0e1118cf8415166c27dd796864661
|
|
@@ -445,6 +445,7 @@ module OpeningHoursConverter
|
|
|
445
445
|
else
|
|
446
446
|
month_to = nil
|
|
447
447
|
end
|
|
448
|
+
|
|
448
449
|
{ from_day: month_from, to_day: month_to }
|
|
449
450
|
end
|
|
450
451
|
|
|
@@ -550,25 +551,36 @@ module OpeningHoursConverter
|
|
|
550
551
|
def get_multi_month(wrs)
|
|
551
552
|
wrs.split(',').map do |wr|
|
|
552
553
|
if wr.include?('-')
|
|
553
|
-
|
|
554
|
+
start_month_day, end_month_day = wr.split('-')
|
|
555
|
+
|
|
556
|
+
start_month = start_month_day[0...3]
|
|
557
|
+
start_day = start_month_day[4...start_month_day.length]&.to_i
|
|
558
|
+
|
|
559
|
+
end_month = end_month_day[0...3]
|
|
560
|
+
end_day = end_month_day[4...end_month_day.length]&.to_i
|
|
561
|
+
|
|
554
562
|
from = {
|
|
555
563
|
month: OSM_MONTHS.find_index(start_month) + 1,
|
|
556
|
-
day: 1
|
|
564
|
+
day: start_day || 1
|
|
557
565
|
}
|
|
558
566
|
to = {
|
|
559
567
|
month: OSM_MONTHS.find_index(end_month) + 1,
|
|
560
|
-
day: MONTH_END_DAY[OSM_MONTHS.find_index(end_month)]
|
|
568
|
+
day: end_day || MONTH_END_DAY[OSM_MONTHS.find_index(end_month)]
|
|
561
569
|
}
|
|
562
570
|
else
|
|
571
|
+
month = wr[0...3]
|
|
572
|
+
day = wr[4...wr.length]&.to_i
|
|
573
|
+
|
|
563
574
|
from = {
|
|
564
|
-
month: OSM_MONTHS.find_index(
|
|
565
|
-
day: 1
|
|
575
|
+
month: OSM_MONTHS.find_index(month) + 1,
|
|
576
|
+
day: day || 1
|
|
566
577
|
}
|
|
567
578
|
to = {
|
|
568
|
-
month: OSM_MONTHS.find_index(
|
|
569
|
-
day: MONTH_END_DAY[OSM_MONTHS.find_index(
|
|
579
|
+
month: OSM_MONTHS.find_index(month) + 1,
|
|
580
|
+
day: day || MONTH_END_DAY[OSM_MONTHS.find_index(month)]
|
|
570
581
|
}
|
|
571
582
|
end
|
|
583
|
+
|
|
572
584
|
{ from_day: from, to_day: to }
|
|
573
585
|
end
|
|
574
586
|
end
|
|
@@ -178,7 +178,20 @@ module OpeningHoursConverter
|
|
|
178
178
|
end
|
|
179
179
|
|
|
180
180
|
def multi_month_regex
|
|
181
|
-
compile(
|
|
181
|
+
compile(
|
|
182
|
+
line(
|
|
183
|
+
potential_list(
|
|
184
|
+
potential_range(
|
|
185
|
+
month +
|
|
186
|
+
potential(
|
|
187
|
+
group(
|
|
188
|
+
space, potential_range(month_day)
|
|
189
|
+
)
|
|
190
|
+
)
|
|
191
|
+
)
|
|
192
|
+
)
|
|
193
|
+
)
|
|
194
|
+
)
|
|
182
195
|
end
|
|
183
196
|
|
|
184
197
|
def week_value_regex
|
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.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ziserman Martin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-06-
|
|
11
|
+
date: 2020-06-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|