.\" @(#)date.3f 1.4 93/02/01 SMI; from UCB 4.2 .TH DATE 3F "10 October 1997" .SH NAME date \- return date in character form .SH SYNOPSIS .\" .IX date "" \fLdate\fP .IX "date in character form" .\" .B subroutine date (str) .br .B character*9 str .\" .SH DESCRIPTION .\" The .B date subroutine gets the current date and puts it into the character string .BR str . The form is .BR "dd-mmm-yy" . .LP .B dd is the day of the month as a two-digit integer. .LP .B mmm is the name of the month as a three-letter abbreviation: .br Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec. .LP .B yy is the year as a two-digit integer. .sp .B "YEAR 2000 ALERT: date() IS NOT Y2K SAFE!" .br Since date returns a 2-digit year, it should not be used to compare dates without taking this into account. Routines \f3fdate\f1(3f), \f3idate\f1(3f), and \f3date_and_time\f1(3f) do return 4-digit years and could be used instead. .sp Because \f3date\f1 is not Y2K safe, programs using this routine will generate warning messages at compilation and execution. .\" .SH NOTES .\" Usage: \.in +2 .sp .1 .nf .ft 3 character*9 str call date (str) .fi \.in -2 .ft 1 .LP Example: .sp .1 .nf demo% \f3cat dat1.f\f1 * dat1.f -- Get the date as a character string. character c*9 call date ( c ) write (*, "(' The date today is: ', A9 )" ) c end demo% \f3f77 dat1.f \f1 dat1.f: MAIN: "dat1.f", line 2: Warning: Subroutine "date" is not safe after year 2000; use "date_and_time" instead demo% \f3a.out\f1 Computing time differences using the 2 digit year from subroutine date is not safe after year 2000. The date today is: 2-Oct-97 demo% .fi \fP .\" .SH FILES .B libF77.a .SH "SEE ALSO" .BR idate (3f), .BR ctime (3F), .BR fdate (3F), .BR date_and_time (3F), and the .I "FORTRAN 77 Reference Manual"