Intel® Fortran Compiler 17.0 Developer Guide and Reference

IDATE Portability Routine

Portability Subroutine: Returns the month, day, and year of the current system. IDATE can be used as a portability subroutine or as an intrinsic procedure. It is an intrinsic procedure unless you specify USE IFPORT.

Module

USE IFPORT

CALL IDATE (i, j, k)

-or-

CALL IDATE (iarray)

i

(Output) INTEGER(4). Is the current system month.

j

(Output) INTEGER(4). Is the current system day.

k

(Output) INTEGER(4). Is the current system year as an offset from 1900.

iarray

(Output) INTEGER(4). Is a three-element array that holds day as element 1, month as element 2, and year as element 3. The month is between 1 and 12. The year is greater than or equal to 1969 and is returned as 2 digits.

CAUTION

The two-digit year return value may cause problems with the year 2000. Use DATE_AND_TIME instead.

Example

Consider the following:

    use IFPORT
    integer(4) imonth, iday, iyear, datarray(3)
! If the date is July 11, 1999:
    CALL IDATE(IMONTH, IDAY, IYEAR)
! sets IMONTH to 7, IDAY to 11 and IYEAR to 99.
    CALL IDATE (DATARRAY)
! datarray is (/11,7,99/)

See Also