Just that: class Date > def remaining_to(date) > if date.acts_like? :date > date - self > end > end > alias :days_to
end and then be able to do this: Date.today.remaining_to(Date.parse '2014-04-02').days.seconds -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
