gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
dccaldatecurrent.f90
Go to the documentation of this file.
1! -*- mode: f90; coding: utf-8 -*-
2!-----------------------------------------------------------------------
3! Copyright (c) 2000-2026 Gtool Development Group. All rights reserved.
4!-----------------------------------------------------------------------
21
51subroutine dccaldatecurrent1( date, err )
54 use dc_message, only: messagenotify
55 use dc_types, only: dp, token
56 use dc_trace, only: beginsub, endsub
58 use dc_types, only: string
59 implicit none
60 type(dc_cal_date), intent(out):: date
61 logical, intent(out), optional:: err
62
63 ! 作業変数
64 ! Work variables
65 !
66 integer :: date_time_values(1:8)
67 character(5) :: zone_raw
68
69 character(TOKEN):: zone
70 integer:: stat
71 character(STRING):: cause_c
72 character(*), parameter:: subname = 'DCCalDateCurrent1'
73continue
74 call beginsub( subname )
75 stat = dc_noerr
76 cause_c = ''
77
78!!$ ! 初期設定のチェック
79!!$ ! Check initialization
80!!$ !
81!!$ if ( datep % initialized ) then
82!!$ stat = DC_EALREADYINIT
83!!$ cause_c = 'DC_CAL_DATE'
84!!$ goto 999
85!!$ end if
86
87
88 ! date_and_time 組み込みサブルーチンを用いて, 現在
89 ! 時刻と UTC からの時差を取得.
90 !
91 call date_and_time(zone=zone_raw, values=date_time_values)
92 zone = zone_raw(1:3) // ":" // zone_raw(4:5)
93
94
95 ! オブジェクトの作成
96 ! Create an object
97 !
98 call dccaldatecreate( &
99 & date_time_values(1), date_time_values(2), date_time_values(3), & ! (in)
100 & date_time_values(5), date_time_values(6), & ! (in)
101 & real( date_time_values(7), dp ), & ! (in)
102 & date, zone, err = err ) ! (out) optional
103 if ( present(err) ) then
104 if ( err ) then
105 stat = dc_ebaddate
106 goto 999
107 end if
108 end if
109
110 ! 終了処理, 例外処理
111 ! Termination and Exception handling
112 !
113999 continue
114 call storeerror( stat, subname, err, cause_c )
115 call endsub( subname )
116end subroutine dccaldatecurrent1
subroutine dccaldatecurrent1(date, err)
現在日時の取得
dc_calendar 手続のインターフェース宣言
暦と日時に関する構造データ型と定数
エラー処理用モジュール
Definition dc_error.f90:454
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition dc_error.f90:891
integer, parameter, public dc_noerr
エラー等を保持
Definition dc_error.f90:468
integer, parameter, public dc_ebaddate
Definition dc_error.f90:552
メッセージの出力
デバッグ時の追跡用モジュール
Definition dc_trace.f90:150
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
Definition dc_trace.f90:476
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:599
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition dc_types.f90:128
integer, parameter, public dp
倍精度実数型変数
Definition dc_types.f90:92
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition dc_types.f90:137