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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e8cb46dca51bfd8b10819b2c4d611d0a945b6195
4
- data.tar.gz: 1ac4e597d5d572616f1e899f3af50b36db40867c
3
+ metadata.gz: 802b37f6b12f7cd16186a55a87edf44df589fe00
4
+ data.tar.gz: 9c451e804943ed9023303b28c7c8cac4f2503798
5
5
  SHA512:
6
- metadata.gz: 7aa9f585689380bdabceb5f48ae13871b269fda701b270e5409dfcb10c82fcb26fb4fc3887000da56074225834c6015ceacc87bd6ce0eda63c384114b84ca9e8
7
- data.tar.gz: 13c4951f96d594cf168bd2ff91f5c9393f75a6e06f49eb4dd6fbc776446f193726168b8eeb22c0b705bffe1f4187d67b36162d41faf58f406a0526048194becc
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]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opening_hours_converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.14
4
+ version: 1.7.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ziserman Martin