search for: include_seconds

Displaying 4 results from an estimated 4 matches for "include_seconds".

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
2008 May 20
2
DateHelpers .. don' display.. ?
HI I don''t understand what happen .. if I use the script/console : >> include ActionView::Helpers::DateHelper => Object >> include GLoc => Object >> time_ago_in_words(Time.now, include_seconds = false) => "moins d''une minute" I get the correct answer.. but I I write in my view <%= time_ago_in_words(Time.now, include_seconds = false) -%> I get an error :wrong number of arguments (0 for 1) trace app/helpers/application_helper.rb:96:in `[]'' app/h...
2010 Sep 07
2
Help on formatting some HAML
..."><%= link_to ''Delete'', order, :confirm => ''Are you sure?'', :method => :delete %></span> <li class="time_space"><span class="quiet small time"><%= distance_of_time_in_words_to_now(order.created_at, :include_seconds => true) %> ago</span></li> <% end %> </ul> </div> <div class="page_nav"> Pagination goes here </div> <br /> </div> ---- I have tried it a few different ways to convert this to HAML, but I''m messi...
2006 May 24
0
distance_of_time_in_german_words
...age. 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) end def german_words_for_dist...