inkling
February 7, 2007, 11:15pm
1
Would “am” and “pm” be convenient and useful methods that Rails should
stick on top of the Numeric class?
So instead of calling Time.parse(“23:30”) to get a Time object at
11:30 PM, you could do 1130.pm instead.
Just trying to get an opinion before I create a patch, unit tests, etc
and try and convince someone to notice
Here are the methods if anyone wants to use them:
http://code.inklingmarkets.com/journal/2007/2/7/an-easy-way-to-have-a-time-in-ruby.html
inkling
February 8, 2007, 12:18am
2
That’s actually pretty cool! I’ve never even thought of that. I’d
probably use it a few times, especially when doing scheduling of
things. It would make it easier to think about at least.
–Jeremy
On 2/7/07, inkling [email protected] wrote:
Here are the methods if anyone wants to use them:
http://code.inklingmarkets.com/journal/2007/2/7/an-easy-way-to-have-a-time-in-ruby.html
–
http://www.jeremymcanally.com/
My free Ruby e-book:
http://www.humblelittlerubybook.com/book/
My blogs:
http://www.rubyinpractice.com/
On 2/7/07, inkling [email protected] wrote:
I think it’s a very useful idea. It follows the same concepts already
in
place with dates.
Consider it noticed.
–
Andrew S.