opening_hours_converter 1.7.14 → 1.7.15
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/wide_interval.rb +16 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 802b37f6b12f7cd16186a55a87edf44df589fe00
|
4
|
+
data.tar.gz: 9c451e804943ed9023303b28c7c8cac4f2503798
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88ed8527146fbb1897d80e452c10386912e67d8e1fd9b6df414f7860e230d904aced785ef2c8403fbaa7b05fced733a0d0c9aa07a1cc050c57af91189d3847f9
|
7
|
+
data.tar.gz: 8ab6453ee693d21268428f8b52a74431e60d6802eb47c3b0e204a935564cb9dc06017dc4b41e48c9e5326c459fca2ad79160448d2187f17208cccf6470c61d10
|
@@ -520,8 +520,24 @@ module OpeningHoursConverter
|
|
520
520
|
end
|
521
521
|
end
|
522
522
|
else
|
523
|
+
# binding.pry
|
523
524
|
if in_day.start[:month] == in_day.end[:month]
|
524
525
|
days_count += in_day.end[:day] - in_day.start[:day] + 1
|
526
|
+
elsif in_day.start[:month] > in_day.end[:month]
|
527
|
+
for month in in_day.start[:month]..12
|
528
|
+
if month == in_day.start[:month]
|
529
|
+
days_count += MONTH_END_DAY[month - 1] - in_day.start[:day] + 1
|
530
|
+
else
|
531
|
+
days_count += MONTH_END_DAY[month - 1]
|
532
|
+
end
|
533
|
+
end
|
534
|
+
for month in 1..in_day.end[:month]
|
535
|
+
if month == in_day.end[:month]
|
536
|
+
days_count += in_day.end[:day]
|
537
|
+
else
|
538
|
+
days_count += MONTH_END_DAY[month - 1]
|
539
|
+
end
|
540
|
+
end
|
525
541
|
else
|
526
542
|
for month in in_day.start[:month]..in_day.end[:month]
|
527
543
|
if month == in_day.end[:month]
|