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. |