Leap year warning - 2000 is NOT a leap year

Leap year warning - 2000 is NOT a leap year

Post by Alex Ram » Sat, 31 Dec 1994 05:12:57




> Also, on some UNIX machines, a function exists call 'dysize(int year)' or
> something like that that returns the number of days in the year passed.
> (366 for leap years). It should not be used, or else used with a check
> for years divisible by 400, as it returns 366 when you pass it 2000.

Or maybe just keep using dysize(), but ask your system vendor to fix
it where it should be fixed (i.e. in the C library).

--

 
 
 

Leap year warning - 2000 is NOT a leap year

Post by Wolfgang Steg » Sat, 31 Dec 1994 18:09:00


: > Also, on some UNIX machines, a function exists call 'dysize(int year)' or
: > something like that that returns the number of days in the year passed.
: > (366 for leap years). It should not be used, or else used with a check
: > for years divisible by 400, as it returns 366 when you pass it 2000.

: Or maybe just keep using dysize(), but ask your system vendor to fix
: it where it should be fixed (i.e. in the C library).

: --

2000 IS a leap year. The Gregorian Calendar says:

year % 4 == 0: leap year EXCEPT
year % 100 == 0: no a leap year EXCEPT
year % 400 == 0: leap year !!!

2000 % 400 = 0, so 2000 is a leap year (1900 wasn't).
--
Wolfgang Steger


 
 
 

Leap year warning - 2000 is NOT a leap year

Post by De » Mon, 02 Jan 1995 09:56:48



> Also, on some UNIX machines, a function exists call 'dysize(int year)' or
> something like that that returns the number of days in the year passed.
> (366 for leap years). It should not be used, or else used with a check
> for years divisible by 400, as it returns 366 when you pass it 2000.

Hang on a sec -- 2000 _is_ a leap year.  1900 wasn't.  Years divisible
by 100 are not leap years unless they are divisible by 400.  I think
you guys have your numbers around the wrong way.

Del
--
-------------------------------+-------------------------------------

-------------------------------+-------------------------------------

 
 
 

Leap year warning - 2000 is NOT a leap year

Post by Randy Chapma » Tue, 03 Jan 1995 06:18:56



> > Also, on some UNIX machines, a function exists call 'dysize(int year)' or
> > something like that that returns the number of days in the year passed.
> > (366 for leap years). It should not be used, or else used with a check
> > for years divisible by 400, as it returns 366 when you pass it 2000.

Hate to break it to you, but 2000 -is- a leap year.  1900 was not, 2100
won't be.  At least, that's what I've always been told.

--Randy Chapman

 
 
 

Leap year warning - 2000 is NOT a leap year

Post by David E. Wilens » Tue, 03 Jan 1995 11:33:22



|> >
|> > > Also, on some UNIX machines, a function exists call 'dysize(int year)' or
|> > > something like that that returns the number of days in the year passed.
|> > > (366 for leap years). It should not be used, or else used with a check
|> > > for years divisible by 400, as it returns 366 when you pass it 2000.
|>
|> Hate to break it to you, but 2000 -is- a leap year.  1900 was not, 2100
|> won't be.  At least, that's what I've always been told.
|>
|> --Randy Chapman

Last I knew it was is leap if (divisible by 4 and not by 100 except for 1000) -
soooo that makes 2000 a leap year.
--
David Wilensky

 
 
 

Leap year warning - 2000 is NOT a leap year

Post by Network Computing Solutio » Tue, 03 Jan 1995 13:34:58




Quote:

>Last I knew it was is leap if (divisible by 4 and not by 100 except for
>1000) - soooo that makes 2000 a leap year.
>--
>David Wilensky

The correct rule, is:

                (year / 4) && (!(year/100) || (year/400))

        2000 =   True (1)  && (!True (0)   ||  True (1))
        2000 =   True (1)  && True (1)
        2000 =   True (1)

--

Unix Systems Engineer                 |
Network Computing Solutions           |       "Wisconsin Escapee"
Cary, NC 27511, (919) 380-7550        |

 
 
 

Leap year warning - 2000 is NOT a leap year

Post by Christopher L Smi » Wed, 04 Jan 1995 02:23:58


: > > (366 for leap years). It should not be used, or else used with a check
: > > for years divisible by 400, as it returns 366 when you pass it 2000.

: Hate to break it to you, but 2000 -is- a leap year.  1900 was not, 2100
: won't be.  At least, that's what I've always been told.

2000/400=5 1900/400 is not an integer.  2000 is the irregularity - it will
not be a leap year, one of the corrections to our imperfect timesystem we
will have to face.

--
Christopher L. Smith
Yale Divinity School            SUNY at Stony Brook (Applied Mathematics)
New Haven, CT                   Stony Brook, NY


 
 
 

Leap year warning - 2000 is NOT a leap year

Post by Byron A Je » Wed, 04 Jan 1995 03:30:47






>: > > (366 for leap years). It should not be used, or else used with a check
>: > > for years divisible by 400, as it returns 366 when you pass it 2000.

>: Hate to break it to you, but 2000 -is- a leap year.  1900 was not, 2100
>: won't be.  At least, that's what I've always been told.

>2000/400=5 1900/400 is not an integer.  2000 is the irregularity - it will
>not be a leap year, one of the corrections to our imperfect timesystem we
>will have to face.

??????????

This isn't hard. In English:

- All non century years divisible by 4 are leap years.
- All century years divisible by 400 are leap years.
- All other years are not leap years.

2000 is a leap year (century year divisible by 400)
1900 isn't a leap year.
2100 isn't a leap year.

I have my first year C students coding this. It isn't rocket science.

BAJ
--
Another random extraction from the mental bit stream of...
Byron A. Jeff - PhD student operating in parallel - And Using Linux!

 
 
 

Leap year warning - 2000 is NOT a leap year

Post by Har » Wed, 04 Jan 1995 03:42:45





>: > > (366 for leap years). It should not be used, or else used with a check
>: > > for years divisible by 400, as it returns 366 when you pass it 2000.
>: Hate to break it to you, but 2000 -is- a leap year.  1900 was not, 2100
>: won't be.  At least, that's what I've always been told.

        OK, one year is about 365.24 days, right?  So, every four years,
there is an extra .96 day.  This differs from 1 by .04.  So, everytime we
have a leap year, the time goes off by .04.  Therefore, every 25 leap years,
or 100 years, there is not one in order to compensate.  I think that years
divisible by 400 _are_ leap years, because the length of one year is not
quite exactly 365.24 days, it's slightly less.
 
 
 

Leap year warning - 2000 is NOT a leap year

Post by Godmar Ba » Wed, 04 Jan 1995 03:42:08



   Path: news.cs.utah.edu!cs.utexas.edu!howland.reston.ans.net!newsserver.jvnc.net!yale.edu!news.ycc.yale.edu!smithc

   Newsgroups: comp.lang.c,comp.os.linux.development.system
   Followup-To: comp.lang.c,comp.os.linux.development.system
   Date: 2 Jan 1995 17:23:58 GMT
   Organization: Yale University
   Lines: 19

   NNTP-Posting-Host: mercury.cis.yale.edu
   X-Newsreader: TIN [version 1.2 PL2]
   Xref: news.cs.utah.edu comp.lang.c:113095 comp.os.linux.development.system:161



   : > > (366 for leap years). It should not be used, or else used with a check
   : > > for years divisible by 400, as it returns 366 when you pass it 2000.

   : Hate to break it to you, but 2000 -is- a leap year.  1900 was not, 2100
   : won't be.  At least, that's what I've always been told.

   2000/400=5 1900/400 is not an integer.  2000 is the irregularity - it will
   not be a leap year, one of the corrections to our imperfect timesystem we
   will have to face.

I know we shouldn't continue this discussion, but maybe the following
explanation helps:

A year is approximately 365.2425 days long, astronomically.
This yields 365.2425 * 400 = 146097 days for 400 years.
365 * 400 is only 146000, so we have to introduce 97
leap days. This was done be declaring the rule that
caused so much misunderstanding.

In other words, unlike 1700, 1800, and 1900; 2000 will be a
leap year.

Godmar

P.S.: the calculation wasn't done on a Pentium.
P.P.S.: I realize that this 'proof' is rather a matter of
belief than of science, and I could have proved the
opposite by setting the length to 365.2475.
Oh well, just believe it.

 
 
 

Leap year warning - 2000 is NOT a leap year

Post by Dave Schauma » Wed, 04 Jan 1995 03:46:35


[rant deleted]

Two things:

        1. 2000 is a leap year.
        2. This is a fine example of a Thread That Will Not Die[tm].
           I highly recommend to anyone interested in preserving
           their sanity to put "leap year" in their kill file.

-Dave

 
 
 

Leap year warning - 2000 is NOT a leap year

Post by Nate Bail » Tue, 03 Jan 1995 14:36:05


(Note followup-to)


Quote:>The correct rule, is:

>            (year / 4) && (!(year/100) || (year/400))

>    2000 =   True (1)  && (!True (0)   ||  True (1))
>    2000 =   True (1)  && True (1)
>    2000 =   True (1)

This problem seems to be a bit broader than just ANSI-C - What I'm
wondering is - what kind of ramifications can such a mistake have?
ie. how serious is it that many programs may not have February 29th, 2000?

Since this is a programming wide issue, I set the followup to comp.programming

Nate
(Still awaiting the creation of comp.lang.c.moderated :)

 
 
 

1. 2000 is not world's end! [was: 2000 *IS* Leap Year Problems (Was: Leap year warning)]



|> [ followups to poster ]



|> > Sorry, you are wrong!
|> >
|> > The next century does not start with January 1, 2000 !!
|> > It starts with January 1, 2001 !!!!
|>
|> Wrong, Valentin. And don't imagine that you are "correcting" somebody
|> when you give your _opinion_.
|>
|> IMO hidebound traditionalists have it wrong _both_ ways: not only are
|> you mathematically wrong -- 0-based counting is superior to 1-based
|> counting and certainly more natural for this purpose -- but neither do
|> you have the rationale of popular convention, since most people feel it
|> begins in 2000.

Strange how many hidebound traditionalists there are, imagine thinking
that a century should have 100 years, next thing you know they'll be
suggesting irrational constants for the ratio of of the diameter of a
circle to its circumference when we all know it is 3.2 :^). Fortunately
mathematics is still beyond the pale for public opion, even in America.

--

Michael Salmon

#include        <standard.disclaimer>
#include        <witty.saying>
#include        <fancy.pseudo.graphics>

Ericsson Telecom AB
Stockholm

2. A question about bash.

3. hardware clock fails 2000 leap year test

4. another disksuite 4.1 question

5. getdate() does not work with leap-years

6. Linux and Merced

7. To leap or not to leap

8. socket in TIME_WAIT state too longly !!!

9. Unix program cal says 1700 is a leap year!

10. Leap Year shell script function

11. Leap year silliness

12. The leap-year algorithm?

13. Leap year bug in backup system ?