since_when 0.0.4 → 0.0.5

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.
@@ -1,3 +1,3 @@
1
1
  module SinceWhen
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/since_when.rb CHANGED
@@ -8,7 +8,9 @@ module SinceWhen
8
8
  time_string = ""
9
9
 
10
10
  if date.class != Date
11
- date = date.to_datetime
11
+ unless date.class == DateTime
12
+ date = date.to_datetime
13
+ end
12
14
  hour_dif = DateTime.now.hour - date.hour
13
15
  minute_dif = DateTime.now.minute - date.minute
14
16
  second_dif = DateTime.now.second - date.second
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.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: