Relative Time Helper plugin

Plugin details

Used for getting multifield attributes like those generated by a select_datetime into a new Time object. For example if you have following params={:meetup=>{:"time(1i)=>..."}} just do following:
Time.parse_from_attributes(params[:meetup], :time)

Repositoryhttp://ar-code.svn.engineyard.com/plugins/relative_time_helpers/ Author Rick Olson Tags Time, helper, relative LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install http://ar-code.svn.engineyard.com/plugins/relative_time_helpers/
<%= relative_time(Time.now) %> 
today
<%= relative_time(1.day.ago) %> 
yesterday
<%= relative_time(1.day.from_now) %> 
tomorrow
<%= relative_time_span([Time.now, 5.days.from_now]) %> 
May 17th – 22nd

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | Back in time (1 older version) | Last edited by: hardway, 20 days ago