× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: Leap Year
  • From: Neil Palmer <npalmer@xxxxxxxxxxx>
  • Date: Wed, 26 Aug 1998 15:08:00 -0600

Oops - at the top I say 1700 wasn't a leap year.  It was because it
preceded the Gregorian reformation.  (I got it right further down in the
note).

Neil Palmer                                AS/400~~~~~      
NxTrend Technology - Canada   ____________          ___  ~     
Thornhill, Ontario,  Canada   |OOOOOOOOOO| ________  o|__||=   
Phone: (905) 731-9000  x238   |__________|_|______|_|______)   
Cell.: (416) 565-1682  x238    oo      oo   oo  oo   OOOo=o\   
Fax:   (905) 731-9202       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
mailto:NPalmer@NxTrend.com    AS/400  The Ultimate Business Server      
http://www.NxTrend.com

> -----Original Message-----
> From: Neil Palmer 
> Sent: Wednesday, August 26, 1998 2:21 PM
> To:   'MIDRANGE-L@midrange.com'
> Cc:   'venu_yamajala@goodyear.com'
> Subject:      RE: Leap Year
> 
> Well, 1700, 1800 & 1900 were not leap years. 2000 is.
>       Your new calc won't work.  Try for 1900.
> 
>       Divide CCYY by 400
>                       1900 not divisible by 400
> 
>       If divisible then it is a leap year, else
>       Divide CCYY by 4
>       If divisible then it is a leap year, else it is not a leap year.
>                       1900 is divisible by 4, but it's not a leap
> year.
> 
> A subroutine from an old RPG program I just exhumed.
> There is another rule that says that if the year is also divisible
> evenly by 4000 (or 3600 - depending on where you find the information)
> then it's not a leap year.  It's referred to as a COMMON year - I
> wonder
> what city the conference will be in ?  :-).  
> Frankly I don't give a rat's a** what happens in the year 4000 (or
> 3600).  I'm pretty sure we can assume that none of our programs will
> be
> running at that point !   
> (Note that this is fine for dates AFTER the Gregorian calendar
> reformation in 1752.  For example, the years 1300, 1400, 1500 and 1700
> were leap years).
> 
> C           LEAPYR    BEGSR                           LEAP YEAR TEST
> C**  Leap Year: If the year is divisible by 4 it is, but if it's    
> C**   divisible by 100 it's not, unless it's also divisible by 400. 
> C**   We're ignoring the "if it's divisible by 4000 (or 3600 ?)     
> C**   then it's not a leap year" rule.   :-)                        
> C           FOUR      DIV  4         RES     40        LEAP YEAR    
> C                     MVR            MVR4    40                     
> C           FOUR      DIV  100       RES               NOT LEAP YEAR
> C                     MVR            MVR100  40                     
> C           FOUR      DIV  400       RES               LEAP YEAR    
> C                     MVR            MVR400  40                     
> C           MVR4      IFEQ *ZERO                       Div by 4     
> C           MVR100    ANDNE*ZERO                        & not by 100
> C           MVR400    OREQ *ZERO                       or Div by 400
> C                     MOVE *ON       *IN31             LEAP YEAR    
> C                     ELSE                              else        
> C                     MOVE *OFF      *IN31             NOT LEAP YEAR
> C                     ENDIF                                         
> C                     ENDSR                                         
> 
> 
> Also a couple of references:
> http://www.digtl.com/leapyr.htm
> http://wwwcn.cern.ch/~mcnab/n/Cal/README.cal.txt
> 
> 
> Neil Palmer        
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.