Amiel Martin
Not a member
Amiel Martin's latest activity
Thursday, February 26 2009
2067
Numeric::Time is not consistent, giving confusing results to Duration#inspect
was updated
in Ruby on Rails
-
Amiel Martin commented at 6:52 AMSo, what would be the best action here? I'd love to contribute, and I think having a way to output a duration in human readable form would be a good feature.
Wednesday, February 25 2009
2067
Numeric::Time is not consistent, giving confusing results to Duration#inspect
was updated
in Ruby on Rails
-
Amiel Martin commented at 6:09 AMor, maybe this would be better
>> 5.seconds + 1.minute => 65 seconds >> _.humanize => "1 minute and 5 seconds"I'm happy to implement any of the above, ...
-
- Title changed from Numeric::Time is not consistent giving confusing results to Duration#inspect to Numeric::Time is not consistent, giving confusing results to Duration#inspect
-
Amiel Martin commented at 6:04 AManother idea is to write a method in ActiveSupport::Duration that "normalizes" internal data.
# example >> 65.seconds => 65 seconds >> 65.seconds.parts =... -
Amiel Martin created the ticket at 5:34 AMIs there a reason that ActiveSupport::CoreExtensions::Numeric::Time#minutes (and hours) don't their own unit as a type when creating an ActiveSupport::Duration ...