Board index » delphi » Is 2000 a leap year?

Is 2000 a leap year?

In Article<R0h1rCApZJPxE...@merlyn.demon.co.uk>, <j...@merlyn.demon.co.uk> write:

Quote
> Path: news1.sunbelt.net!udel!news.mathworks.com!tank.news.pipex.net!pipex!dispatch.news.demon.net!demon!merlyn.demon.co.uk!jrs
> From: Dr John Stockton <j...@merlyn.demon.co.uk>
> Newsgroups: comp.lang.pascal.borland
> Subject: Re: Is 2000 a leap year?
> Date: Tue, 5 Mar 1996 19:30:49 +0000
> Organization: Home, Surrey, UK
> Lines: 21
> Distribution: world
> Message-ID: <R0h1rCApZJPxE...@merlyn.demon.co.uk>
> References: <4guq3f$...@news.rz.uni-passau.de>
>  <DnGHv8....@cix.compulink.co.uk> <4h16rd$...@reimari.uwasa.fi>
>  <31354AD9....@nmsu.edu>
> NNTP-Posting-Host: merlyn.demon.co.uk
> X-NNTP-Posting-Host: merlyn.demon.co.uk
> MIME-Version: 1.0
> X-Newsreader: Turnpike Version 1.12 <FaPHOaas0ellLCXbR0oIxSiVaE>

> In article <31354AD9....@nmsu.edu>, Quantum Porcupine <jsha...@nmsu.edu>
> wrote:

> Snipped algorithm looks OK.

> >Anyway, this is easier to say in English... if the year is divisible by 4,
> >then it is a leapyear unless it is divisible by 100 and not divisible by
> >400.  The reason for the special century case is because the year isn't
> >exactly 365.25 days long.  

> That's true.

> The century case accounts for this, keeping our
> calendars precise within a couple seconds for at least 10,000 years ...

> That's not so. A correction of one whole day would be justified after
> _about_ 3200 years, although NO SUCH CORRECTION HAS YET BEEN AGREED.

> --
> John Stockton, Surrey, UK.  Turnpike v1.12.  MIME.

Gee, whiz, why can't you just say that 2000 is a leap year and 2100 is not?
(cant say I'd be around for the latter).

Buck Cheves

 

Re:Is 2000 a leap year?


In article <NEWTNews.841345192.30696.kc4...@STC.NET.STC.NET>,

Quote
 <kc4...@stc.net> wrote:

(Dr John Stockton's good treatise delete)
:Gee, whiz, why can't you just say that 2000 is a leap year and 2100 is not?

Sorry to be blunt, but that is a rather stupid comment. We get these
from time to time. Of course an answer that contains a general
principle is useful. There is no reason for jumping on John about
it. Just provide your own contributions without the misguided
one-upmanship.

   All the best, Timo

....................................................................
Prof. Timo Salmi   Co-moderator of news:comp.archives.msdos.announce
Moderating at ftp:// & http://garbo.uwasa.fi archives  193.166.120.5
Department of Accounting and Business Finance  ; University of Vaasa
t...@uwasa.fi http://uwasa.fi/~ts BBS 961-3170972; FIN-65101,  Finland

Re:Is 2000 a leap year?


In Article<505pns$...@reimari.uwasa.fi>, <t...@reimari.uwasa.fi> write:

Quote
> Path:

news1.sunbelt.net!news.sprintlink.net!news-dc-10.sprintlink.net!nntp.coast.net!
oleane!jussieu.fr!math.ohio-state.edu!howland.erols.net!cam-news-hub1.bbnplanet
com!bloom-beacon.mit.edu!eru.mt.luth.se!news.algonet.se!news.hebel.net!news.si
cs.se!news.telia.se!verkko.uwasa.fi!not-for-mail
Quote
> From: t...@reimari.uwasa.fi (Timo Salmi)
> Newsgroups: comp.lang.pascal.borland
> Subject: Re: Is 2000 a leap year?
> Date: 30 Aug 1996 07:12:44 +0300
> Organization: University of Vaasa
> Lines: 18
> Message-ID: <505pns$...@reimari.uwasa.fi>
> References: <4guq3f$...@news.rz.uni-passau.de> <31354AD9....@nmsu.edu>

<R0h1rCApZJPxE...@merlyn.demon.co.uk>
<NEWTNews.841345192.30696.kc4...@STC.NET.STC.NET>

Quote
> NNTP-Posting-Host: reimari.uwasa.fi

> In article <NEWTNews.841345192.30696.kc4...@STC.NET.STC.NET>,
>  <kc4...@stc.net> wrote:
> (Dr John Stockton's good treatise delete)
> :Gee, whiz, why can't you just say that 2000 is a leap year and 2100 is not?

> Sorry to be blunt, but that is a rather stupid comment. We get these
> from time to time. Of course an answer that contains a general
> principle is useful. There is no reason for jumping on John about
> it. Just provide your own contributions without the misguided
> one-upmanship.

>    All the best, Timo

> .....................................................................
> Prof. Timo Salmi   Co-moderator of news:comp.archives.msdos.announce
> Moderating at ftp:// & http://garbo.uwasa.fi archives  193.166.120.5
> Department of Accounting and Business Finance  ; University of Vaasa
> t...@uwasa.fi http://uwasa.fi/~ts BBS 961-3170972; FIN-65101,  Finland

Well, Timo,

I suppose I could have been a little more constructive in my criticism.
Also, a better original response would have, perhaps, been better
understood (perhaps some examples would have been much more informative,
and, although I believe I know what the general algorithm is, I found
that it was very difficult to dig out of the original text).

Please believe me when I say that I had no intention of denigrating
Dr. Stockton in any way; it just seems (and seemed) to me that this:

A leap year is any year which is divisible without remainder by 4,
except when that occurs on a century boundary (e.g. 2000).  In that
case, if the century (20 for this example) is also divisible evenly
by 4, then it is still a leap year; in the case of the year 2100,
the century (21) is not evenly divisible by four, so 2100 would not
be a leap year.

This says the same thing that Dr. Stockton said, except that the
examples included in the text of the clarification are (to me)
clear, which Dr. Stockton's example was not.

I hereby extend my apologies to you, and will be happy to do the same
to Dr. Stockton (I'd need his e-mail address to do that privately, if
he would prefer) in a private note, or here in a public forum.  That
is his choice.

Best regards,

Buck Cheves, KC4GCK
kc4...@stc.net

Re:Is 2000 a leap year?


In article <NEWTNews.841449495.8816.kc4...@STC.NET.STC.NET>,

Quote
 <kc4...@stc.net> wrote:

:> :Gee, whiz, why can't you just say that 2000 is a leap year and 2100 is not?
:>
:> Sorry to be blunt, but that is a rather stupid comment. We get these

:I hereby extend my apologies to you, and will be happy to do the same

That is quite ok, Buck. I am pleased to see that you are
constructive about the situation. Not everyone always is. Please
enjoy the newsgroup.

While we are on the subject of leap years, here is what the TP FAQ
has:

-From: ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip Frequently Asked TP Questions
-Subject: Leap year

91. *****
 Q: Is 2000 a leap year? What is the leap year algorithm?

 A: With the approaching turn of the century this question is
becoming more and more common. Here is the algorithm in Turbo
Pascal.
 function ISLEAP (y : integer) : boolean;
 begin
   isleap := (y mod 4 = 0) and not ((y mod 100 = 0) and not (y mod 400 = 0));
 end;  (* isleap *)
My thanks are due to Dr. John Stockton and Associate Professor Seppo
Pynnonen for confirming the result. In fact it was who John
suggested adding this question to the FAQ.
   There are several equivalent formulations achieving the same
result. Also nested multi-line if statments could be used. The
boolean statements are much more concise, even if not very easy to
construct.
   If you are interested calendar related questions here is one
useful URL reference: ftp://login.dknet.dk/pub/ct/calendar.faq
"Frequentely asked questions about calendars" by Claus Tondering.
--------------------------------------------------------------------

   All the best, Timo

....................................................................
Prof. Timo Salmi   Co-moderator of news:comp.archives.msdos.announce
Moderating at ftp:// & http://garbo.uwasa.fi archives  193.166.120.5
Department of Accounting and Business Finance  ; University of Vaasa
t...@uwasa.fi http://uwasa.fi/~ts BBS 961-3170972; FIN-65101,  Finland

Other Threads