NAME date - return date in character form SYNOPSIS subroutine date (str) character*9 str DESCRIPTION The date subroutine gets the current date and puts it into the character string str. The form is dd-mmm-yy. dd is the day of the month as a two-digit integer. mmm is the name of the month as a three-letter abbreviation: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec. yy is the year as a two-digit integer. YEAR 2000 ALERT: date() IS NOT Y2K SAFE! Since date returns a 2-digit year, it should not be used to compare dates without taking this into account. Routines fdate(3f), idate(3f), and date_and_time(3f) do return 4- digit years and could be used instead. Because date is not Y2K safe, programs using this routine will generate warning messages at compilation and execution. NOTES Usage: character*9 str call date (str) Example: demo% cat dat1.f * dat1.f -- Get the date as a character string. character c*9 call date ( c ) write (*, "(' The date today is: ', A9 )" ) c end demo% f77 dat1.f dat1.f: MAIN: "dat1.f", line 2: Warning: Subroutine "date" is not safe after year 2000; use "date_and_time" instead demo% a.out 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% FILES libF77.a SEE ALSO idate(3f), ctime(3F), fdate(3F), date_and_time(3F), and the FORTRAN 77 Reference Manual
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |