From: "Hélio Rocha" Date: 2008-10-27T23:36:07+09:00 Subject: Re: Days in a year ------=_Part_24690_32892414.1225118192503 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Just check if the year is leap. In google u'll find something like: int __isleap (int year) { /* every fourth year is a leap year except for century years that are * not divisible by 400. */ /* return (year % 4 =3D=3D 0 && (year % 100 !=3D 0 || year % 400 =3D=3D 0)= ); */ return (!(year %4) && ((year%100) || !(year %400))); } On Mon, Oct 27, 2008 at 2:12 PM, P=E5l Bergstr=F6m w= rote: > How do I get number of days in a year? > -- > Posted via http://www.ruby-forum.com/. > > ------=_Part_24690_32892414.1225118192503--