wordnik_ruby_helpers 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module WordnikRubyHelpers
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -20,7 +20,8 @@ module WordnikRubyHelpers
20
20
  # Use words if within the last week, otherwise use date (show year if not this year)
21
21
  def time_ago_in_words_or_date(date,options={})
22
22
  return unless date
23
- if (Time.now-date)/60/60/24 < 7
23
+ date = Date.parse(date)
24
+ if (Date.today-date)/60/60/24 < 7
24
25
  time_ago_in_words(date) + " ago"
25
26
  elsif date.year == Time.now.year
26
27
  options[:short_format] ? date.strftime(options[:short_format]) : date.strftime("%b %e").gsub(" ", " ")
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: wordnik_ruby_helpers
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.2
5
+ version: 0.1.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Zeke Sikelianos
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-05-10 00:00:00 -07:00
14
+ date: 2011-06-02 00:00:00 -05:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency