Well I don’t know if it’s a trick, but this sure was useful when I was coding up some sql reports.
>> Date.new(2009, 1, -1).to_s
=> "2009-01-31"
Small Ruby Date trick
Posted in Programming.
– May 1, 2009
nom nom nom
Well I don’t know if it’s a trick, but this sure was useful when I was coding up some sql reports.
>> Date.new(2009, 1, -1).to_s
=> "2009-01-31"
Posted in Programming.
– May 1, 2009
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.