Commit b3942bd9 authored by Fabio Pelosin's avatar Fabio Pelosin

[Presenter::CocoaPod] Robustness against nil last activity.

parent 638d78e5
...@@ -98,6 +98,7 @@ module Pod ...@@ -98,6 +98,7 @@ module Pod
end end
def distance_from_now_in_words(from_time) def distance_from_now_in_words(from_time)
return nil unless from_time
from_time = Time.parse(from_time) from_time = Time.parse(from_time)
to_time = Time.now to_time = Time.now
distance_in_days = (((to_time - from_time).abs)/60/60/24).round distance_in_days = (((to_time - from_time).abs)/60/60/24).round
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment