IDATE(3F)IDATE(3F)NAMEidate - return date in numerical form
SYNOPSISidate has a standard version and a VMS version:
subroutine idate(iarray)
integer*4 iarray(3)
is the standard version
subroutine idate(m, d, y)
integer*4 m, d, y
is the VMS version
YEAR 2000 ALERT: 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. Routines 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.
DESCRIPTION
Standard Version
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%
VMS Version (compile with -lV77flag):
The idate subroutine puts the current date into the integers m, d,
and y.
VMS version allows only 2 digits. This 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%
FILES
libF77.a, libV77.a
NOTE
Compiling with the f77 compiler -lV77flag, links with the VMS versions
of idate() and time(). (f77 only)
SEE ALSOdate(3f), fdate(3F), date_and_time(3F), and the FORTRAN 77 Reference
Manual
03/02/25 IDATE(3F)