On Wednesday 31 August 2005 2:06 pm, csjasnoch / wisc.edu wrote:
> Is there a simple way to see if a year is a leap year (rather than
> writting an algorithm I wanted to check if it is already implimented
> first)
>
> It would be kewl if there was just a check on a Time var

irb(main):001:0> require 'date'
=> true
irb(main):002:0> d = Date.parse(Time.now.to_s)
=> #<Date: 4907227/2,0,2299161>
irb(main):003:0> d.to_s
=> "2005-08-31"
irb(main):004:0> d.leap?
=> false


Kirk Haines