Hi Prem, thanks for you reply :) strftime is a Time method, not Numeric. The diff between dates results a Float. If you ask this result if is_a?(Numeric) returns true, is_a?(Time) returns false.
My proposal is a helper like "strfperiod" if it is in Ruby. Working with diff time periods, not dates. Example: https://gist.github.com/wilsondealmeida/e5903ac9693c6df949256c06b68b1656 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at https://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.