0.0
No commit activity in last 3 years
No release in over 3 years
A tiny Ruby lib for parsing human format of time duration to numbers.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

Clever Duration¶ ↑

Super tiny Ruby library for parsing human format of time durations to numbers.

It’s far for complete, but it’s a good base for future development. Test suit included.

Check tests for a list of supported formats.

Example¶ ↑

duration = CleverDuration.new("1 hour 30 minutes")
duration.hours # => 1.5
duration.seconds # => 5400
duration.minutes # => 90

History¶ ↑

The library was extracted from Beanstalk during the awesome Wildbit Open Source Fridays.

Read more about Open Source Fridays here:

wildbit.com/blog/2010/01/15/open-source-fridays-at-wildbit/

Copyright © 2010 Ilya Sabanin, Wildbit; see LICENSE for details.