opening_hours_converter 1.7.6 → 1.7.7
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 +4 -4
- data/lib/opening_hours_converter/wide_interval.rb +18 -10
- 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: 76ab6fe0b066c5e83f2c975a040a7a722a61c25c
|
|
4
|
+
data.tar.gz: 9192212170e365daca8e7b5a0117b651588518e4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc6b889429594820c05e965c656180bd2cce70f7410e0b4000ad7c552301b88baaf25d4fe83ae171ad11d44905745917b1219e6a2ece02ba3c4892436967a4d1
|
|
7
|
+
data.tar.gz: c97856e124f28cc246ae3068bd40cc42a511548a9e2b6905771ef37791f1036da7ebe02892291622de595f8d3514f38eefaa7e120e78656d42e1e47e3fb330d6
|
|
@@ -504,6 +504,24 @@ module OpeningHoursConverter
|
|
|
504
504
|
end
|
|
505
505
|
end
|
|
506
506
|
end
|
|
507
|
+
else
|
|
508
|
+
if in_day.start[:month] == in_day.end[:month]
|
|
509
|
+
days_count += in_day.end[:day] - in_day.start[:day]
|
|
510
|
+
else
|
|
511
|
+
for month in in_day.start[:month]..in_day.end[:month]
|
|
512
|
+
if month == in_day.end[:month]
|
|
513
|
+
days_count += in_day.end[:day]
|
|
514
|
+
elsif month == in_day.start[:month]
|
|
515
|
+
days_count += MONTH_END_DAY[month - 1] - in_day.start[:day]
|
|
516
|
+
else
|
|
517
|
+
days_count += MONTH_END_DAY[month - 1]
|
|
518
|
+
end
|
|
519
|
+
end
|
|
520
|
+
end
|
|
521
|
+
end
|
|
522
|
+
else
|
|
523
|
+
if in_day.start[:month] == in_day.end[:month]
|
|
524
|
+
days_count += in_day.end[:day] - in_day.start[:day]
|
|
507
525
|
else
|
|
508
526
|
for month in in_day.start[:month]..in_day.end[:month]
|
|
509
527
|
if month == in_day.end[:month]
|
|
@@ -515,16 +533,6 @@ module OpeningHoursConverter
|
|
|
515
533
|
end
|
|
516
534
|
end
|
|
517
535
|
end
|
|
518
|
-
else
|
|
519
|
-
for month in in_day.start[:month]..in_day.end[:month]
|
|
520
|
-
if month == in_day.end[:month]
|
|
521
|
-
days_count += in_day.end[:day]
|
|
522
|
-
elsif month == in_day.start[:month]
|
|
523
|
-
days_count += MONTH_END_DAY[month - 1] - in_day.start[:day]
|
|
524
|
-
else
|
|
525
|
-
days_count += MONTH_END_DAY[month - 1]
|
|
526
|
-
end
|
|
527
|
-
end
|
|
528
536
|
end
|
|
529
537
|
return days_count
|
|
530
538
|
else
|