public
Description: conversions, validations and helpers to deal with elapsed time as english and stored as seconds
Homepage:
Clone URL: git://github.com/sbfaulkner/elapsed_time.git
sbfaulkner (author)
Thu Jun 12 11:35:47 -0700 2008
commit  014f000a5d1b9f8fdb29693b30520f2a0e962c98
tree    f00c162d3566c02200ad548063ea86822ffea277
name age message
file MIT-LICENSE Loading commit data...
file README
file Rakefile
file init.rb
directory lib/
directory test/
README
ElapsedTime
===========

Add support for converting an English representation of elapsed time into seconds and back (with validation).


Example
=======

"1 day, 10 hours, 17 minutes and 36 seconds".parse_elapsed_time
=> 123456

123456.to_elapsed_time
=> "1 day, 10 hours, 17 minutes and 36 seconds"

class Job < ActiveRecord::Base
  elapsed_time :estimate
  validates_elapsed_time_of :estimate, :allow_nil => true
end

Copyright (c) 2008 unwwwired.net, released under the MIT license