RPGIV @ Work

A unique site for RPG and System i Lovers

Welcome!

Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

Check Leap Year Print E-mail
User Rating: / 5
PoorBest 
Written by Chamara Withanachchi   
  D chkLeapDay      S              8  0            
  D leapYear        S                   Like(*IN99)

   /Free
   
      // Check for Leap Year                                    
      chkLeapYear = 1966;                     
      leapYear = *OFF;                        
      If (%Rem(chkLeapYear : 4) = *Zeros and  
          %Rem(chkLeapYear : 100) <> *Zeros)  
          or %Rem(chkLeapYear : 400) = *Zeros;
         leapYear = *ON;                      
      EndIf;                                  
                                        
      chkLeapYear = 1968;                     
      leapYear = *OFF;                        
      If (%Rem(chkLeapYear : 4) = *Zeros and  
          %Rem(chkLeapYear : 100) <> *Zeros)  
          or %Rem(chkLeapYear : 400) = *Zeros;
         leapYear = *ON;                      
      EndIf;          
                        
   /End-Free          


User Comments

Please login or register to add comments

<Previous   Next>