international_date_parser 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e56a933ec9210f342b7a0d48feffa7a32ae23bd
4
- data.tar.gz: 0c5eb00f9d17eae931af6593cd0dbbbb03f12b81
3
+ metadata.gz: c543bf4b48ec7255f1728fefcbe5112d7d186f00
4
+ data.tar.gz: 61b8b6fe017e346a49a0ea1225b01f65c3fb0cc8
5
5
  SHA512:
6
- metadata.gz: ed8a25e6f43489e9db88aa2c0e2f76e660ae05fe8309a81c7a25fdd33a1efdd898eb35586d29309327ce9f33f83ed92c84e496f377e447986f76f8a06165604e
7
- data.tar.gz: a7079ea0443f56047deada4cf8a69964f841b6f17730ac22b3dce734ddf5dce269d921bfdefd58b3503a7a367bcf9c090493ccbb70185fbe1e7c2d539c5890db
6
+ metadata.gz: 8feee4490094ebdb45017ff1f09b311ee552c9cddeb198b3240466ea936847350bfe69b96c6da81e7940822e615c40e240fb504494c4071f11a74d09e2d4fb04
7
+ data.tar.gz: c24098b985998e1037ba40bade03e7892f9ff167a4c055b7044b177913d955331d3d5321b4dc84ea7b93d9144596407135dac4068b39f3ba72de524892367e00
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in international_date_parser.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Humberto
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # International Date Parser
2
+
3
+
4
+ #### Purpose:
5
+ Extend the date parsing capabilities of Ruby to work with dates which months are different than english.
6
+
7
+ #### Usage:
8
+ ```
9
+ Date.parse_international("28 de Fevereiro de 2020")
10
+ DateTime.parse_international("28 de Fevereiro de 2020")
11
+ "28 de Fevereiro de 2020".to_international_date
12
+ ```
13
+
14
+ #### Notes:
15
+ * This routine works by substituting your local month names (as defined by Date::MONTH_TRANSLATIONS) for the
16
+ international names when they occur in the date_string.
17
+ + As distributed, this code works for French, German, Italian, Portuguese and Spanish. You must add the month
18
+ names for any additional languages you wish to handle.
19
+
20
+ ## Inspired on a gist
21
+ https://github.com/jackrg
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
Binary file
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'international_date_parser/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "international_date_parser"
8
+ spec.version = InternationalDateParser::VERSION
9
+ spec.authors = ["Humberto"]
10
+ spec.email = ["hlsp999@gmail.com"]
11
+ spec.summary = "International Date Parser "
12
+ spec.description = "Ruby class Date wrapper to translate months and then parse the string"
13
+ spec.homepage = 'http://github.com/frenesim/international_date_parser'
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ end
@@ -1,6 +1,6 @@
1
- module InternationalDateParser
2
- MAJOR = 0
3
- MINOR = 1
4
- REVISION = 3
5
- VERSION = [MAJOR, MINOR, REVISION].join(".")
1
+ module InternationalDateParser
2
+ MAJOR = 0
3
+ MINOR = 1
4
+ REVISION = 4
5
+ VERSION = [MAJOR, MINOR, REVISION].join(".")
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: international_date_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Humberto
@@ -9,15 +9,51 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2015-12-28 00:00:00.000000000 Z
12
- dependencies: []
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
13
41
  description: Ruby class Date wrapper to translate months and then parse the string
14
- email: hlsp999@gmail.com
42
+ email:
43
+ - hlsp999@gmail.com
15
44
  executables: []
16
45
  extensions: []
17
46
  extra_rdoc_files: []
18
47
  files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - LICENSE.txt
51
+ - README.md
52
+ - Rakefile
53
+ - international_date_parser-0.1.3.gem
54
+ - international_date_parser.gemspec
19
55
  - lib/international_date_parser.rb
20
- - lib/version.rb
56
+ - lib/international_date_parser/version.rb
21
57
  homepage: http://github.com/frenesim/international_date_parser
22
58
  licenses:
23
59
  - MIT