dates_from_string 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -0
- data/dates_from_string.gemspec +1 -1
- data/lib/dates_from_string.rb +1 -1
- data/lib/dates_from_string/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 420a88c30d1e4c27226cb513d5f9ff99f31fc4a8
|
4
|
+
data.tar.gz: d1816088a417d53a6b96d334892a0e635a53a6f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c82cb87ad028c5a051a32611fd96925229c4167ec68a20fb726c0b42b46554dd755ba578def4c1ffe347fddfd16e7ae34e3b46c3da7b142dc66c7408ade15433
|
7
|
+
data.tar.gz: be6219215bae79b00287b7f955e3bf6f2d046bcdbbaa13a62888bb4bc601a19f4e3b6e3e943b6c2a5a7fe23f9909c27816e902d7a0ea524addfc1aef3f85421f
|
data/README.md
CHANGED
@@ -106,6 +106,20 @@ obj.get_structure(input)
|
|
106
106
|
# [{:type=>:year, :value=>"1960", :distance=>2, :key_words=>['and']},
|
107
107
|
# {:type=>:year, :value=>"1965", :distance=>0, :key_words=>[]},]
|
108
108
|
|
109
|
+
input = "In September 2011, following a change in the law extending
|
110
|
+
the presidential term from four years to six,[5] Putin announced
|
111
|
+
that he would seek a third, non-consecutive term as President in
|
112
|
+
the 2012 presidential election, an announcement which led to
|
113
|
+
large-scale protests in many Russian cities. In March 2012 he won the election,
|
114
|
+
which was criticized for procedural irregularities, and is serving a six-year term"
|
115
|
+
dates_from_string.get_structure(input)
|
116
|
+
|
117
|
+
#=> return
|
118
|
+
# [{:type=>:month, :value=>"09", :distance=>1, :key_words=>[]},
|
119
|
+
# {:type=>:year, :value=>"2011", :distance=>30, :key_words=>[]},
|
120
|
+
# {:type=>:year, :value=>"2012", :distance=>15, :key_words=>[]},
|
121
|
+
# {:type=>:month, :value=>"03", :distance=>1, :key_words=>[]},
|
122
|
+
# {:type=>:year, :value=>"2012", :distance=>0, :key_words=>[]}]
|
109
123
|
```
|
110
124
|
|
111
125
|
## Development
|
data/dates_from_string.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["kompotdrinker@gmail.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{Flexible solution for finding all formats of dates in text}
|
13
|
-
spec.description = %q{
|
13
|
+
spec.description = %q{Flexible solution for finding all formats of dates in text}
|
14
14
|
spec.homepage = ""
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
data/lib/dates_from_string.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dates_from_string
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Chechaev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description:
|
55
|
+
description: Flexible solution for finding all formats of dates in text
|
56
56
|
email:
|
57
57
|
- kompotdrinker@gmail.com
|
58
58
|
executables: []
|