マニュアルページ idate.3f
名前
idate - 数値形式での日付の取得
形式
idate には、標準バージョンと VMS バージョンとがあります。
subroutine idate(iarray)
integer*4 iarray(3)
標準バージョン
subroutine idate(m, d, y)
integer*4 m, d, y
VMS バージョン
2000 年問題の警告: VMS バージョンは 2000 年問題に対応して い
ません。
VMS モードの idate は 2 桁の年を戻すため、2000 年問題を考 慮
せ ず に日付の比較に使用してはなりません。ルーチン fdate(3f)
と date_and_time(3f) は 4 桁の年を戻すので、代わりにこれらを
使用できます。
idate は 2000 年問題に対応していないため、このルーチンを VMS
モードで使用するプログラムは、コンパイル時および実行時に警告
メッセージを生成します。
機能説明
標準バージョン
サブルーチン idate は、現在の日付を整数配列 iarray に、 日
・月 ・年 の 順 で 格納します。月は 1-12 の範囲、年は 4 桁
(1997 または 2001 など) で表します。
使用例 :
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 バージョン ( -lV77 フラグでのコンパイル)
サブルーチン idate は、現在の日付を整数 m、 d、 y に格納し
ます。
VMS バージョンは 2 桁しか許可しません。これは、2000 年問題
に対応していません。使用例 :
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%
ファイル
libF77.a, libV77.a
注意事項
f77 コンパイラに -lV77 フラグを指定してコンパイルし た 場 合
は、 idate() と time() の VMS バージョンでリンクします (f77
のみ)。
関連項目
date(3f) 、 fdate(3F) 、 date_and_time(3F) 、『Fortran ラ イ
ブラリ・リファレンス』