Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Fixed ruby 1.8.7 issue with dates too old
Browse files Browse the repository at this point in the history
  • Loading branch information
elgalu committed Mar 6, 2013
1 parent 3ca7b3d commit 4e27507
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [In git](https://github.com/elgalu/time_ago_in_words/compare/v0.0.1...HEAD)
## [In git](https://github.com/elgalu/time_ago_in_words/compare/v0.0.2...HEAD)

### New Features
* n/a
Expand All @@ -9,6 +9,17 @@
### Chores
* n/a

## [v0.0.2](https://github.com/elgalu/time_ago_in_words/tree/v0.0.2)

### New Features
* n/a

### Bugfixes
* Fixed ruby 1.8.7 issue with dates too old. (Leo Gallucci)

### Chores
* Applied Extract Method refactor on Time#ago_in_words(). (Leo Gallucci)

## [v0.0.1](https://github.com/elgalu/time_ago_in_words/tree/v0.0.1)

## First gem release
Expand Down
4 changes: 2 additions & 2 deletions spec/time_ago_in_words_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
it "returns empty string on future dates" do
(Time.now + 1.6).ago_in_words.should == ''
(Time.now + 100).ago_in_words.should == ''
(Time.now + 100_000).ago_in_words.should == ''
(Time.now + 9999).ago_in_words.should == ''
end

it "returns 'a very very long time ago' when more than 250 years ago" do
(Time.now - 60*60*24*100_001).ago_in_words.should == 'a very very long time ago'
Time.local(1700,01,01).ago_in_words.should == 'a very very long time ago'
end

it "can handle many days ago" do
Expand Down

0 comments on commit 4e27507

Please sign in to comment.