Date class>>leapYear

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Date class>>leapYear

Ted Bracht-2
Hi,

Date class>>leapYear returns 1 for a leap year and 0 for a non-leap year.
Shouldn't the return value be a boolean (true/false)?

Ted


Reply | Threaded
Open this post in threaded view
|

Re: Date class>>leapYear

Ted Bracht-2
"Ted Bracht" <[hidden email]> wrote in message
news:3c7fb5c7$1@tobjects....
> Hi,
>
> Date class>>leapYear returns 1 for a leap year and 0 for a non-leap year.
> Shouldn't the return value be a boolean (true/false)?
>
> Ted
>
>

Playing a bit more with Date I came across another oddity

(Date fromString: '28 Feb 2002') yearsSince: (Date fromString: '29 Feb
2000')

returns 2. I would expect that to return 1. Would somebody born on the 29th
in a leap year celebrate their birthday on the 28th or the 1st of March?

Ted


Reply | Threaded
Open this post in threaded view
|

Re: Date class>>leapYear

Syver Enstad-3
"Ted Bracht" <[hidden email]> writes:

>Would somebody born on the 29th in a leap year celebrate their
>birthday on the 28th or the 1st of March?
>
Neither, people born on a leap year day age at approx. 1/4 the speed of
everybody else. So they only have birthdays in leapyears.

--

Vennlig hilsen

Syver Enstad