Hi --

On Thu, 1 Sep 2005, 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
>
>
> Like,
>
> now = Time.new
> flag = now.leapyear?

Yes:

   irb(main):023:0> Date.today.leap?
   => false
   irb(main):024:0> (Date.today << 12).leap?
   => true


David

-- 
David A. Black
dblack / wobblini.net