dater 0.0.3 → 0.1.0

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.
Files changed (4) hide show
  1. data/README.md +11 -7
  2. data/lib/dater/version.rb +1 -1
  3. data/lib/dater.rb +6 -0
  4. metadata +1 -1
data/README.md CHANGED
@@ -7,9 +7,9 @@ You can also, convert dates from 'dd/mm/yyyy' to 'yyyy-mm-dd' or viceversa.
7
7
 
8
8
  If you want to pass a formatted date like dd/mm/yyyy to convert to yyyy-mm-dd, you have to take care about only two things with the argument:
9
9
 
10
- - Year number must have four digits.
10
+ 1. Year number must have four digits.
11
11
 
12
- - Month number must be always in the middle.
12
+ 2. Month number must be always in the middle.
13
13
 
14
14
  ## Installation
15
15
 
@@ -27,12 +27,16 @@ Or install it yourself as:
27
27
 
28
28
  ## Usage
29
29
 
30
- Initialize a dater object with a format to convert to:
30
+ #Require gem
31
+
32
+ require 'dater'
33
+
34
+ #Initialize a dater object with a format to convert to:
31
35
 
32
36
  date=Dater::Resolver.new('%Y-%m-%d')
33
37
 
34
- To get the converted date:
35
-
38
+ #To get the converted date:
39
+
36
40
  date.for("in 2 days") # => yyyy-mm-dd (date for 2 days from the date of today)
37
41
  date.for("in 10 months") # => yyyy-mm-dd (date for 10 months from the date of today)
38
42
  date.for("in 1 year") # => yyyy-mm-dd (date for 1 year from the date of today)
@@ -55,7 +59,7 @@ It does not work correctly with leap-years and calculates months of 30 days only
55
59
 
56
60
  Si deseas usar esta gema en español puedes inicializar la clase de la siguiente manera:
57
61
 
58
- date=Dater::Resolver.new('%Y-%m-%d', "en")
62
+ date=Dater::Resolver.new('%Y-%m-%d', "es")
59
63
 
60
64
  Con eso puedes pasar argumentos en idioma español (por ejemplo 'en 2 días', 'en 10 meses', 'en 1 año')
61
65
 
@@ -65,7 +69,7 @@ Se você quiser usar esta gem em Português, você pode inicializar a classe da
65
69
 
66
70
  date=Dater::Resolver.new('%Y-%m-%d', "pt")
67
71
 
68
- Com isso você pode passar argumentos em Português (em dois dias, em 10 meses, 1 ano)
72
+ Com isso você pode passar argumentos em Português (em 2 dias, em 10 meses, 1 ano)
69
73
  ## Contributing
70
74
 
71
75
  1. Fork it
data/lib/dater/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dater
2
- VERSION = "0.0.3"
2
+ VERSION = "0.1.0"
3
3
  end
data/lib/dater.rb CHANGED
@@ -77,5 +77,11 @@ module Dater
77
77
  end
78
78
  return @date
79
79
  end
80
+
81
+ def para(period)
82
+ self.for(period)
83
+ end
84
+
85
+ def
80
86
  end
81
87
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dater
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: