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)
Inquire information of date.
subroutine dccaldateinquire2(date_str, elapse_sec, date, cal, err)
Interface declarations for dc_calendar procedures.
Internal module for dc_calendar.
type(dc_cal), target, save, public default_cal
Default calendar object
type(dc_cal_date), target, save, public default_date
Default date object
integer function, public dccaldate_normalize(year, month, day, hour, min, sec, cal)
subroutine, public default_cal_set
Derived types and parameters of calendar and date.
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_enotinit
-400 or less: DC utilities errors
integer, parameter, public dc_noerr
Error storage variables
integer, parameter, public dc_einconsistcaldate
Handling character types.
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)
Provides kind type parameter values.
integer, parameter, public token
Character length for word, token
integer, parameter, public string
Character length for string
integer, parameter, public dp
Double Precision Real number