Usage Note 3036: YRDIF function returns unexpected results with partial leap year
The DATA step function YRDIF returns unexpected results when either
the beginning or ending dates specified fall within a leap year. The
only exception would be January 1 of that year as the beginning date
or December 31 of that year as the ending date, because these dates
include the entire leap year.
The following example returns a value of 6.9977094094.
data _null_;
start='01mar1992'd;
end='01mar1999'd;
dif=yrdif(start,end,'ACT/ACT');
run;
The above behavior is by design. The formula used to calculate the
difference is considered to be an industry standard.
Operating System and Release Information
SAS System | Base SAS | Solaris | 8 TS M0 | |
OpenVMS VAX | 8 TS M0 | |
Microsoft Windows 95/98 | 8 TS M0 | |
64-bit Enabled Solaris | 8 TS M0 | |
HP-UX | 8 TS M0 | |
z/OS | 8 TS M0 | |
OS/2 | 8 TS M0 | |
CMS | 8 TS M0 | |
64-bit Enabled AIX | 8 TS M0 | |
64-bit Enabled HP-UX | 8 TS M0 | |
Microsoft Windows NT Workstation | 8 TS M0 | |
OpenVMS Alpha | 8 TS M0 | |
Tru64 UNIX | 8 TS M0 | |
AIX | 8 TS M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Usage Note |
Priority: | medium |
Topic: | SAS Reference ==> Functions
|
Date Modified: | 2000-07-31 12:07:27 |
Date Created: | 2000-07-13 12:06:41 |