subroutine idate(iarray) integer*4 iarray(3)
subroutine idate(m, d, y) integer*4 m, d, y
idate has a Standard version and a VMS version. The VMS version is not Y2K-Safe.
The idate subroutine puts the current date into the integer array iarray. The order is: day, month, year. The month is in the range 1-12. The year is four digits, such as 1997, or 2001. Example:
demo% cat ida2.f integer*4 a(3) call idate( a ) write(*, "(' The date is: ',3i5)" ) a end demo% f77 -silent ida2.f demo% a.out The date is: 23 1 1997 demo%
Compile with -lV77flag.
The idate subroutine puts the current date into the integers m, d, and y. The VMS version allows only 2 digits and is not Y2K-Safe. Example:
demo% cat ida1.f integer*4 m, d, y call idate( m, d, y ) write(*, "(' The date is: ',3i3)" ) m, d, y end demo% f77 ida1.f -lV77 ida1.f: MAIN: "ida1.f", line 2: Warning: Subroutine "idate" is not safe after year 2000; use "date_and_time" instead demo% a.out Computing time differences using the 2 digit year from subroutine idate is not safe after year 2000. The date is: 7 23 97 demo%
libF77.a, libV77.a
The VMS version is not Y2K-Safe. Since idate in VMS mode returns a 2-digit year, it should not be used to compare dates without taking this into account. fdate (3F) ) and date_and_time (3F) do return 4-digit years and could be used instead.
Because idate is not Y2K-Safe, programs using this routine in VMS mode will generate warning messages at compilation and execution.
Compiling with the f77 compiler -lV77 flag links with the VMS versions of idate() and time(). (f77 only)
date (3F) , fdate (3F) , date_and_time (3F)
FORTRAN 77 Reference Manual