APPX is the Premier Development and Runtime Environment for Business Application Software
(Answer) (Category) FAQ's - APPX Software, Inc. : (Category) APPX Utility : (Category) APPX Development Environment : (Category) Tips & Techniques :
How to determine a leap year!
Create a work date field as CC-DD, in the example below this work field is 
WORK DATE and the year I am checking is in WORK YEAR.

Using ILF:

        SET      TRN WORK DATE                      =     TRN WORK YEAR
        SET      TRN WORK DATE                      =     ----0229--------
        IF       TRN WORK DATE                      EQ    ------29--------
T       (the year in WORK YEAR is a leap year)

When 0229 is put in a date field that contains a year, APPX will determine 
if 0229 is valid for that year.  If it is, 0229 will remain.  If not, APPX 
date logic will convert the 0229 to 0301.  In the example above, the first 
SET puts the year in the CC-DD date field.  The second set puts Feb 29 into 
that year.  The IF checks to see if the day is still 29.  If it is, then this 
is a leap year.  
[Append to This Answer]
2004-Jan-07 2:20pm
Previous: (Answer) Use of --- DEFAULT MODE
Next: (Answer) How can I position a widget exactly where I want it?
This document is: http://board.appx.com/cgi-bin/fom.cgi?file=292
[Search] [Appearance]
This is a Faq-O-Matic 2.719.
Copyright 2003 by APPX Software, Inc. All rights reserved.