Displaying 2 results from an estimated 2 matches for "from_time".
Did you mean:
from_name
2013 Jan 02
4
distance_of_time_in_words_to_now
Hi There,
As I have learned the hard way, let me discuss my question, idea or feature
here before doing actual work on it...
distance_of_time_in_words_to_now() seems to be unable to tell if this
distance is in the future or in the past.
I''d really like to see ''in 5 days'' or ''5 days ago'' depending on, well, if
it was 5 days ago or will be in 5
2006 May 24
0
distance_of_time_in_german_words
...ites in the german
language. Basically I copied the definition of the rails builtin
distance_of_time_in_words and extracted another method
german_words_for_distance_in_seconds. Just put these e.g. into module
ApplicationHelper and you can use it in all views.
def distance_of_time_in_german_words(from_time, to_time = 0,
include_seconds = false)
from_time = from_time.to_time if from_time.respond_to?(:to_time)
to_time = to_time.to_time if to_time.respond_to?(:to_time)
distance_in_seconds = ((to_time - from_time).abs).round
german_words_for_distance_in_seconds(distance_in_seconds)
en...