opening_hours_converter 1.7.6 → 1.7.7

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: 0724a4ba5512463c59ad4e713a5ed26d7b8d09e0
4
- data.tar.gz: 4b37f5e42e6fb7627cf8c2099cb29404c8a75dc3
3
+ metadata.gz: 76ab6fe0b066c5e83f2c975a040a7a722a61c25c
4
+ data.tar.gz: 9192212170e365daca8e7b5a0117b651588518e4
5
5
  SHA512:
6
- metadata.gz: 31cf99bc1fd37b7c8df26ee96736b0df988e30f60c661d0e85ef22b92468481e28f3b3cd8ac1f5537ecd97a941e9d05ef2bdab89699be95abca8aab8200fc9bb
7
- data.tar.gz: 5ce90faf39c681bcc2cff37623ca7e3df4a44bfd465d4b4ce63037b86b9f0e96efe99918ead39f459fdd9662260658e0b36573a96b9a6dd0b9b2632bbcb6f85d
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
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.6
4
+ version: 1.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ziserman Martin