since_when 0.0.5 → 0.0.6

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.
data/README.md CHANGED
@@ -3,6 +3,9 @@
3
3
  Returns a string containing the amount of time since the date given with
4
4
  varying scopes of specificy.
5
5
 
6
+ **Currently on the drawing board:
7
+ * Support for weeks
8
+
6
9
  ## Installation
7
10
 
8
11
  Add this line to your application's Gemfile:
@@ -17,11 +20,22 @@ Or install it yourself as:
17
20
 
18
21
  $ gem install since_when
19
22
 
23
+ **Make sure the date gem is required in app as well
24
+
20
25
  ## Usage
21
26
 
22
- SinceWhen::time_since( date, :scope )
27
+ SinceWhen::time_since( date, :scope = optional )
28
+
29
+ * date can be a Date object, DateTime object, or anything else that can be turned into a DateTime object (ie. ActiveSupport::TimeWithZone)
30
+ * Scope can be any of the following:
31
+ * :year
32
+ * :month (default)
33
+ * :day
34
+ * :hour
35
+ * :minute
36
+ * :second
23
37
 
24
- Example:
38
+ ## Example:
25
39
 
26
40
  example_date = Date.new(2001, 2, 3)
27
41
 
@@ -1,3 +1,3 @@
1
1
  module SinceWhen
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/lib/since_when.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require "since_when/version"
2
+ require "date"
2
3
 
3
4
  module SinceWhen
4
5
  def self.time_since date, scope = :month
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: since_when
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: