sbfaulkner / elapsed_time
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | ||
| |
README.markdown | ||
| |
Rakefile | ||
| |
init.rb | ||
| |
lib/ | ||
| |
test/ |
README.markdown
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
Legal
Author: S. Brent Faulkner brentf@unwwwired.net
License: Copyright © 2008 unwwwired.net, released under the MIT license

