opening_hours_converter 1.4.3 → 1.4.4
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51910f5b1ad844e6dd0389e0543f5fcec9de91a5
|
4
|
+
data.tar.gz: acdac6e0de9c5ea000f48f9ea8d18675c724d00f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecaa948f5f328f760038fb8d604b07972e7787a0378cc29ac2f766591a4da8cf29c1babba14e9075fa412e263ae33fe929c0f109729b0230206ce0b35d2e5920
|
7
|
+
data.tar.gz: afcd55214ec201a091a5608fcb838d468b5005af049d67638208d8b1c06294235f6b14f9180a236ed9e9666c31924a961cf8b0157f983686d6b1051946b7e56b
|
@@ -73,7 +73,8 @@ module OpeningHoursConverter
|
|
73
73
|
if day_bool && month_start < 0
|
74
74
|
month_start = month
|
75
75
|
day_start = day
|
76
|
-
|
76
|
+
end
|
77
|
+
if day_bool && month_start >= 0 && month == 11 && day == 30
|
77
78
|
result["always"] ||= []
|
78
79
|
result["always"] << {start: { day: day_start, month: month_start }, end: { day: 30, month: 11 }}
|
79
80
|
month_start = -1
|
@@ -161,7 +162,11 @@ module OpeningHoursConverter
|
|
161
162
|
elsif starts_month?(interval) && ends_month?(interval)
|
162
163
|
str_result += "#{OSM_MONTHS[interval[:start][:month]]}-#{OSM_MONTHS[interval[:end][:month]]}"
|
163
164
|
elsif is_same_month?(interval)
|
164
|
-
|
165
|
+
if is_same_day?(interval)
|
166
|
+
str_result += "#{OSM_MONTHS[interval[:start][:month]]} #{interval[:start][:day]+1 < 10 ? "0#{interval[:start][:day]+1}" : interval[:start][:day]+1}"
|
167
|
+
else
|
168
|
+
str_result += "#{OSM_MONTHS[interval[:start][:month]]} #{interval[:start][:day]+1 < 10 ? "0#{interval[:start][:day]+1}" : interval[:start][:day]+1}-#{interval[:end][:day]+1 < 10 ? "0#{interval[:end][:day]+1}" : interval[:end][:day]+1}"
|
169
|
+
end
|
165
170
|
else
|
166
171
|
str_result += "#{OSM_MONTHS[interval[:start][:month]]} #{interval[:start][:day]+1 < 10 ? "0#{interval[:start][:day]+1}" : interval[:start][:day]+1}-#{OSM_MONTHS[interval[:end][:month]]} #{interval[:end][:day]+1 < 10 ? "0#{interval[:end][:day]+1}" : interval[:end][:day]+1}"
|
167
172
|
end
|