opening_hours_converter 1.4.16 → 1.4.17

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: 6ebcf36fa4db20e99f9831f2244a9933fc2d0764
4
- data.tar.gz: fdb289a6a6da2c1cbecd024ac37b95583b67f107
3
+ metadata.gz: 669c41a41232c2ec313fc364e29d48fa5eb12dc7
4
+ data.tar.gz: 1152ac197152568691c9d49cc1090e19d71b0537
5
5
  SHA512:
6
- metadata.gz: 4b6775c9aa28aad1f9c9dbd9669d25e2ba678856b5d3f75c173753b610f58ccafc64e2e96d64c04eee5e184b7878349106758db8041c808be2766054e29996dc
7
- data.tar.gz: dd4208dcde059e87893e8b69f7874ed14693fad58d8b0df143b48996bc8bd51045541c46d2c9814c9c29b3e710fdfd092ee347940552dce69a8d588cd289a244
6
+ metadata.gz: 296912ab3c446e5203b8dd6c3698e654dbc310dc4046c81607e99b4fe84dc2e6316f445a1e8f35ad2eed5569fa989fd8eb40ee191e6a0aa2ede2bbe6ea7e12b5
7
+ data.tar.gz: 0b23783a4444834f48d4ddc0292def520ba2f9254186a6bda0def62b91c330cd2b964bc4f974c3fbbfc149e40bb68dc85fef927ea51762893c645122eb1d98f5
@@ -179,8 +179,8 @@ module OpeningHoursConverter
179
179
  end
180
180
  if starts_year?(interval) && ends_year?(interval)
181
181
  str_result += "#{interval[:start][:year]}-#{interval[:end][:year]}"
182
- elsif starts_month?(interval) && ends_month?(interval)
183
- str_result += "#{interval[:start][:year]} #{OSM_MONTHS[interval[:start][:month]]}-#{interval[:end][:year]} #{OSM_MONTHS[interval[:end][:month]]}"
182
+ # elsif starts_month?(interval) && ends_month?(interval)
183
+ # str_result += "#{interval[:start][:year]} #{OSM_MONTHS[interval[:start][:month]]}-#{interval[:end][:year]} #{OSM_MONTHS[interval[:end][:month]]}"
184
184
  else
185
185
  str_result += "#{interval[:start][:year]} #{OSM_MONTHS[interval[:start][:month]]} #{interval[:start][:day]+1 < 10 ? "0#{interval[:start][:day]+1}" : interval[:start][:day]+1}-#{interval[:end][:year]} #{OSM_MONTHS[interval[:end][:month]]} #{interval[:end][:day]+1 < 10 ? "0#{interval[:end][:day]+1}" : interval[:end][:day]+1}"
186
186
  end
@@ -190,10 +190,10 @@ module OpeningHoursConverter
190
190
  local_str = "#{selector} "
191
191
  intervals.each do |interval|
192
192
  if is_full_year?(interval)
193
- elsif is_full_month?(interval)
194
- local_str += "#{local_str.length > 5 ? "," : ""}#{OSM_MONTHS[interval[:start][:month]]}"
195
- elsif starts_month?(interval) && ends_month?(interval)
196
- local_str += "#{local_str.length > 5 ? "," : ""}#{OSM_MONTHS[interval[:start][:month]]}-#{OSM_MONTHS[interval[:end][:month]]}"
193
+ # elsif
194
+ # local_str += "#{local_str.length > 5 ? "," : ""}#{OSM_MONTHS[interval[:start][:month]]}"
195
+ # elsif
196
+ # local_str += "#{local_str.length > 5 ? "," : ""}#{OSM_MONTHS[interval[:start][:month]]}-#{OSM_MONTHS[interval[:end][:month]]}"
197
197
  elsif is_same_month?(interval)
198
198
  if is_same_day?(interval)
199
199
  local_str += "#{local_str.length > 5 ? "," : ""}#{OSM_MONTHS[interval[:start][:month]]} #{interval[:start][:day]+1 < 10 ? "0#{interval[:start][:day]+1}" : interval[:start][:day]+1}"
@@ -201,7 +201,7 @@ module OpeningHoursConverter
201
201
  local_str += "#{local_str.length > 5 ? "," : ""}#{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}"
202
202
  end
203
203
  else
204
- local_str += "#{local_str.length > 5 ? "," : ""}#{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}"
204
+ local_str += "#{local_str.length > 5 ? "," : ""}#{OSM_MONTHS[interval[:start][:month]]} #{interval[:start][:day]+1 < 10 ? "0#{interval[:start][:day]+1}" : interval[:start][:day]+1}-#{selector} #{OSM_MONTHS[interval[:end][:month]]} #{interval[:end][:day]+1 < 10 ? "0#{interval[:end][:day]+1}" : interval[:end][:day]+1}"
205
205
  end
206
206
  end
207
207
  str_result += "#{str_result.length > 0 ? "," : ""}#{local_str}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opening_hours_converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.16
4
+ version: 1.4.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ziserman Martin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-13 00:00:00.000000000 Z
11
+ date: 2017-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json