dates_from_string 0.9.3 → 0.9.4

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: 5127fb4b47b2bc71ba5f4c559098307955a01f87
4
- data.tar.gz: a0b580abb53ca6b7411e4dd3376372fb0e343df8
3
+ metadata.gz: 0de1067f7e7ac78707b253cf7f0d4eb147b3d6ff
4
+ data.tar.gz: 32d18ebc707205cdf3dccbd4e92de3212c0b6c59
5
5
  SHA512:
6
- metadata.gz: 34d58952331c9f5647e1f261f5748b5d2ab81016d79e28dac54147368c099d7a4f5669e196caf966039172ae3a55601049e5bcefdc6b5225e0fdde5136b8ea75
7
- data.tar.gz: 05d37983afa4191afacc8219c2d69c561649dabe0b676b0d61168c01aaaaea2922a4b427900538b2a79d6960c5111e52d95d270a246f8e41988acaebb75e25ef
6
+ metadata.gz: ab721b5f27f71e8ed03373445398319115d69aa9e260434dd05178ea284fa4343cbdf26632cfd5c29effaa6b2e9cef5500f6ca164daed220e8e14279e3269d93
7
+ data.tar.gz: 58d6a2a8ff27200ae4d7996a70d842ddc62eb67f9800650395f207320ff2ff540f9720883a08348c9119d58bdbba4a88787f42020ae939d166858e3ecfd173ad
@@ -35,6 +35,9 @@ class DatesFromString
35
35
  end
36
36
 
37
37
  if value_full_date
38
+ if @main_arr.size == 0
39
+ index = 0
40
+ end
38
41
  add_to_structure(:year ,value_full_date[0], index, next_index, data_arr)
39
42
  add_to_structure(:month ,value_full_date[1], index, next_index, data_arr)
40
43
  add_to_structure(:day ,value_full_date[2], index, next_index, data_arr)
@@ -1,3 +1,3 @@
1
1
  class DatesFromString
2
- VERSION = "0.9.3"
2
+ VERSION = "0.9.4"
3
3
  end
@@ -24,7 +24,7 @@ class ParsingStructure
24
24
  if item[:type] == :day && item[:distance] == 0
25
25
  day = item[:value]
26
26
  end
27
-
27
+
28
28
  if year && month && day
29
29
  array_of_full_data << [year,month,day].join("-")
30
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dates_from_string
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Chechaev