IDATE

IDATE can be used as an intrinsic subroutine or as a portability routine.

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

IDATE Intrinsic Subroutine

Intrinsic Subroutine: Returns three integer values representing the current month, day, and year.

Syntax

CALL IDATE (i, j, k)

i
Is the current month.


j
Is the current day.


k
Is the current year.

Example

If the current date is September 16, 1996, the values of the integer variables upon return are: I = 9, J = 16, and K = 96.


IDATE Portability Routine

Portability Subroutine: Returns the month, day, and year of the current system.

Module: USE DFPORT

Syntax

CALL IDATE (i, j, k)

-or-

CALL IDATE (iarray)

i
(Output) INTEGER(4). Current system month.


j
(Output) INTEGER(4). Current system day.


k
(Output) INTEGER(4). Current system year as an offset from 1900.


iarray
(Output) INTEGER(4). 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 and the year is greater than or equal to 1969.

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

See Also: DATE, DATE_AND_TIME, GETDAT

Example

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