Displaying 1 result from an estimated 1 matches for "distance_of_time_in_german_word".
Did you mean:
distance_of_time_in_german_words
2006 May 24
0
distance_of_time_in_german_words
...l for those of you producing websites 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_sec...