dates_from_string 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dates_from_string.rb +12 -0
- data/lib/dates_from_string/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d486dcca01fb31dd1c983b77d997f573c8588023
|
4
|
+
data.tar.gz: 483ea64e4c3e06355b95fb35f20635b188548f78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed1b1e8182907904253f9e60f85776677e0ab4ab466ed498e49d994938713d21d7d4d676b5d1bc355dcd78622156839789e8e1f65b5197fe51123d1414fd816d
|
7
|
+
data.tar.gz: 74f2b4c078549bb7cfddd2e8b78ebf0b39bf7bec4ba39fcb830e68cfd788b77794024652c5d9cabd29e4e99cdab671699294e7f9276d6c583350a68b56e4d946
|
data/lib/dates_from_string.rb
CHANGED
@@ -85,6 +85,18 @@ class DatesFromString
|
|
85
85
|
result.to_s.split("-")
|
86
86
|
elsif (result = string.match(/\d{2}-\d{2}-\d{4}/))
|
87
87
|
result.to_s.split("-").reverse
|
88
|
+
elsif (result = string.match(/\d{4}-\d{1}-\d{2}/))
|
89
|
+
result.to_s.split("-")
|
90
|
+
elsif (result = string.match(/\d{2}-\d{1}-\d{4}/))
|
91
|
+
result.to_s.split("-").reverse
|
92
|
+
elsif (result = string.match(/\d{4}-\d{1}-\d{1}/))
|
93
|
+
result.to_s.split("-")
|
94
|
+
elsif (result = string.match(/\d{1}-\d{1}-\d{4}/))
|
95
|
+
result.to_s.split("-").reverse
|
96
|
+
elsif (result = string.match(/\d{4}-\d{2}-\d{1}/))
|
97
|
+
result.to_s.split("-")
|
98
|
+
elsif (result = string.match(/\d{1}-\d{2}-\d{4}/))
|
99
|
+
result.to_s.split("-").reverse
|
88
100
|
elsif (result = string.match(/\d{4}\.\d{2}\.\d{2}/))
|
89
101
|
result.to_s.split(".")
|
90
102
|
elsif (result = string.match(/\d{2}\.\d{2}\.\d{4}/))
|
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.9.
|
4
|
+
version: 0.9.2
|
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-05-
|
11
|
+
date: 2015-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|