search for: half_a_minut

Displaying 2 results from an estimated 2 matches for "half_a_minut".

Did you mean: half_a_minute
2011 May 23
4
Distance of time in days
In rails 3 there is distance_of_time_in_words which works fine, but I would like to tweak its output a bit. The thing is that if the dates are exactly the same it will say "Less Than a Minute" I would like it to show "Today" instead. Is that possible? Tiago Veloso ti.veloso-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org -- You received this message because you are subscribed to
2007 Sep 18
0
distance_of_time_in_words hardcoded strings should be separated for easier localization
...st the same way, the hardcoded time strings should be easily overridden without breaking or re-implementing the logic in distance_of_time_in_words. This patch creates a new placeholder for the hardcoded strings: @@time_messages = { :less_than_x_seconds => "less than %d seconds", :half_a_minute => "half a minute", ... } Now you are able to overwrite with Helpers::DateHelpers::time_messages[:less_than_x_seconds] = "an instant" or similar. I also added some lines of documentation for overriding, as well as ran the tests which pass. Please a) verify tha...