.\" @(#)idate.3f 1.4 86/01/02 SMI; from UCB 4.2 .TH IDATE 3F "99/11/09" .SH NAME idate \- return date in numerical form .SH SYNOPSIS .\" .IX idate "" \fLidate\fP .IX "date in numerical form" .\" .PP .B idate has a standard version and a VMS version: .sp .B subroutine idate(iarray) .br .B integer*4 iarray(3) .br is the standard version .sp .B subroutine idate(m, d, y) .br .B integer*4 m, d, y .br is the VMS version .PP .B "YEAR 2000 ALERT: The VMS version IS NOT Y2K SAFE." .br Since \f3idate\f1 in VMS mode returns a 2-digit year, it should not be used to compare dates without taking this into account. Routines \f3fdate\f1(3f) and \f3date_and_time\f1(3f) do return 4-digit years and could be used instead. .sp Because \f3idate\f1 is not Y2K safe, programs using this routine in VMS mode will generate warning messages at compilation and execution. .\" .SH DESCRIPTION .\" .PP Standard Version .PP .in +2 The .B idate subroutine puts the current date into the integer array .BR 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. .sp Example: .sp .nf .ft 3 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% .ft 1 .fi .in -2 .PP VMS Version (compile with .BR \-lV77 flag): .PP .in +2 The .B idate subroutine puts the current date into the integers .BR m , .BR d , and .BR y . .sp .2 .B "VMS version allows only 2 digits. This is NOT Y2K SAFE." Example: .sp .2 .nf .ft 3 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% .ft 1 .fi .\" .SH FILES .\" .BR libF77.a , .B libV77.a .\" .SH "NOTE" .\" Compiling with the f77 compiler .BR \-lV77 flag, links with the VMS versions of .B idate() and .BR time() . (f77 only) .\" .SH "SEE ALSO" .\" .BR date (3f) , .BR fdate (3F) , .BR date_and_time (3F) , and the .I "FORTRAN 77 Reference Manual"