95 & elapse_sec, date, cal, err )
108 integer,
intent(out),
optional:: year
109 integer,
intent(out),
optional:: month
110 integer,
intent(out),
optional:: day
111 integer,
intent(out),
optional:: hour
112 integer,
intent(out),
optional:: min
113 real(DP),
intent(out),
optional:: sec
114 character(*),
intent(out),
optional:: zone
115 real(DP),
intent(in),
optional:: elapse_sec
116 type(
dc_cal_date),
intent(in),
optional,
target:: date
117 type(
dc_cal),
intent(in),
optional,
target:: cal
118 logical,
intent(out),
optional:: err
123 integer:: wyear, wmonth, wday, whour, wmin
125 character(TOKEN):: wzone
127 type(
dc_cal),
pointer:: calp =>null()
128 character(STRING):: e_date_str, e_cal_str
130 character(STRING):: cause_c
131 character(*),
parameter:: subname =
'DCCalInquire1'
140 if (
present( date ) )
then
146 if (
present( cal ) )
then
156 if ( .not. datep % initialized )
then
158 cause_c =
'DC_CAL_DATE'
162 if ( .not. calp % initialized )
then
172 wmonth = datep % month
182 if (
present( elapse_sec ) )
then
189 wsec = wsec + elapse_sec
199 e_date_str =
dccaldatetochar( wyear, wmonth, wday, whour, wmin, wsec, wzone )
200 call messagenotify(
'W', subname,
'cal=<%c> and date=<%c> are inconsistency', &
201 & c1 = trim(e_cal_str), c2 = trim(e_date_str) )
208 if (
present(year ) ) year = wyear
209 if (
present(month) ) month = wmonth
210 if (
present(day ) ) day = wday
211 if (
present(hour ) ) hour = whour
212 if (
present(min ) ) min = wmin
213 if (
present(sec ) ) sec = wsec
214 if (
present(zone ) ) zone = wzone
220 nullify( calp, datep )
221 call storeerror( stat, subname, err, cause_c )
306 character(*),
intent(out):: date_str
307 real(DP),
intent(in),
optional:: elapse_sec
308 type(
dc_cal_date),
intent(in),
optional,
target:: date
309 type(
dc_cal),
intent(in),
optional,
target:: cal
310 logical,
intent(out),
optional:: err
315 integer:: year, month, day, hour, min
317 character(TOKEN):: zone
319 type(
dc_cal),
pointer:: calp =>null()
320 character(STRING):: e_date_str, e_cal_str
322 character(STRING):: cause_c
323 character(*),
parameter:: subname =
'DCCalInquire2'
332 if (
present( date ) )
then
338 if (
present( cal ) )
then
348 if ( .not. datep % initialized )
then
350 cause_c =
'DC_CAL_DATE'
354 if ( .not. calp % initialized )
then
364 month = datep % month
375 if (
present( elapse_sec ) )
then
382 sec = sec + elapse_sec
393 call messagenotify(
'W', subname,
'cal=<%c> and date=<%c> are inconsistency', &
394 & c1 = trim(e_cal_str), c2 = trim(e_date_str) )
407 nullify( calp, datep )
408 call storeerror( stat, subname, err, cause_c )
subroutine dccaldateinquire1(year, month, day, hour, min, sec, zone, elapse_sec, date, cal, err)
日時情報の問い合わせ
subroutine dccaldateinquire2(date_str, elapse_sec, date, cal, err)
dc_calendar 手続のインターフェース宣言
type(dc_cal), target, save, public default_cal
デフォルトの暦. DCCal で始まる手続のうち, DC_CAL 型の省略可能引数が与えられない 場合にはこの暦が設定もしくは利用される.
type(dc_cal_date), target, save, public default_date
デフォルトの日時. DCCalDate で始まる手続のうち, DC_CAL_DATE 型の省略可能引数が 与えられない場合にはこの日時が設定もしくは利用される.
integer function, public dccaldate_normalize(year, month, day, hour, min, sec, cal)
subroutine, public default_cal_set
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_enotinit
-400 以下: dc ユーティリティのエラー
integer, parameter, public dc_noerr
エラー等を保持
integer, parameter, public dc_einconsistcaldate
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
integer, parameter, public dp
倍精度実数型変数