\hypertarget{dccaldateeval_8f90}{}\section{dc\+\_\+utils/dccaldateeval.f90 File Reference}
\label{dccaldateeval_8f90}\index{dc\+\_\+utils/dccaldateeval.\+f90@{dc\+\_\+utils/dccaldateeval.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{dccaldateeval_8f90_aa541828da0b449cf8221578254f689c0}{dccaldateevalymdhms1} (year, month, day, hour, min, sec, elapse\+\_\+sec, cal, date, err)
\item 
subroutine \hyperlink{dccaldateeval_8f90_a19df8b0b23beb105affd997b8f14fdc9}{dccaldateevalymdhms2} (year, month, day, hour, min, sec, elapse\+\_\+time, units, cal, date, err)
\item 
subroutine \hyperlink{dccaldateeval_8f90_ae40a60950c5d1314c060844625df08af}{dccaldateevalid1} (init\+\_\+date, elapse\+\_\+sec, cal, date, err)
\item 
subroutine \hyperlink{dccaldateeval_8f90_a4e5ec0ff056c24f448f807c6f9c3de14}{dccaldateevalid2} (init\+\_\+date, elapse\+\_\+time, units, cal, date, err)
\item 
subroutine \hyperlink{dccaldateeval_8f90_ad9a7632451f894d8edd2e140bc9da77c}{dccaldateevalym2ym1} (year1, month1, day1, hour1, min1, sec1, elapse\+\_\+sec, year2, month2, day2, hour2, min2, sec2, cal, err)
\item 
subroutine \hyperlink{dccaldateeval_8f90_adfd92e4e46bcfe6c30d007ca03d574c7}{dccaldateevalym2ym2} (year1, month1, day1, hour1, min1, sec1, elapse\+\_\+time, units, year2, month2, day2, hour2, min2, sec2, cal, err)
\item 
real(dp) function \hyperlink{dccaldateeval_8f90_a8fc8208eadddb4f57b904ac89618f013}{dccaldateevalsecofyear1} (elapse\+\_\+sec, date, cal)
\item 
real(dp) function \hyperlink{dccaldateeval_8f90_a4d237c2c0d85985f4a45ad47accc271d}{dccaldateevaldayofyear1} (elapse\+\_\+sec, date, cal)
\item 
real(dp) function \hyperlink{dccaldateeval_8f90_af0ce4e4933b13905548659b0bc073348}{dccaldateevalsecofday1} (elapse\+\_\+sec, date, cal)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{dccaldateeval_8f90_a4d237c2c0d85985f4a45ad47accc271d}\label{dccaldateeval_8f90_a4d237c2c0d85985f4a45ad47accc271d}} 
\index{dccaldateeval.\+f90@{dccaldateeval.\+f90}!dccaldateevaldayofyear1@{dccaldateevaldayofyear1}}
\index{dccaldateevaldayofyear1@{dccaldateevaldayofyear1}!dccaldateeval.\+f90@{dccaldateeval.\+f90}}
\subsubsection{\texorpdfstring{dccaldateevaldayofyear1()}{dccaldateevaldayofyear1()}}
{\footnotesize\ttfamily real(dp) function dccaldateevaldayofyear1 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{elapse\+\_\+sec,  }\item[{type(dc\+\_\+cal\+\_\+date), intent(in), optional, target}]{date,  }\item[{type(dc\+\_\+cal), intent(in), optional, target}]{cal }\end{DoxyParamCaption})}



Definition at line 1250 of file dccaldateeval.\+f90.



References dc\+\_\+calendar\+\_\+internal\+::dccaldate\+\_\+normalize(), dc\+\_\+calendar\+\_\+internal\+::dccaldate\+\_\+ym2d(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal, dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal\+\_\+set(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+date, and dc\+\_\+types\+::dp.


\begin{DoxyCode}
1250   \textcolor{comment}{! 年始めからの通日を算出します. }
1251   \textcolor{comment}{! }
1252   \textcolor{comment}{! 省略可能引数 *date* が省略された場合には, dc\_calendar 内部で}
1253   \textcolor{comment}{! 保持される日時が起点の日時として用いられます. }
1254   \textcolor{comment}{! *date* が省略されない場合にはその変数に設定された日時が}
1255   \textcolor{comment}{! 起点の日時として用いられます. }
1256   \textcolor{comment}{!}
1257   \textcolor{comment}{! 省略可能引数 *cal* が省略された場合には, 経過秒数 *elapse\_sec* }
1258   \textcolor{comment}{! の年月日時分への変換に dc\_calendar 内部で保持される暦が用いられます. }
1259   \textcolor{comment}{! *cal* が省略されない場合にはその変数に設定された暦が用いられます. }
1260   \textcolor{comment}{!}
1261   \textcolor{comment}{! Evaluate day of year. }
1262   \textcolor{comment}{! }
1263   \textcolor{comment}{! If an optional argument *date* is omitted, }
1264   \textcolor{comment}{! information of date that is stored in the "dc\_calendar" }
1265   \textcolor{comment}{! is used as date of origin, }
1266   \textcolor{comment}{! If *date* is not omitted, information of the variable is used as }
1267   \textcolor{comment}{! date of origin. }
1268   \textcolor{comment}{!}
1269   \textcolor{comment}{! If an optional argument *cal* is omitted, }
1270   \textcolor{comment}{! information of calendar that is stored in the "dc\_calendar" }
1271   \textcolor{comment}{! is used for conversion of elapsed seconds *elapse\_sec* into }
1272   \textcolor{comment}{! year-month-day etc.}
1273   \textcolor{comment}{! If *cal* is not omitted, information of the variable is used. }
1274   \textcolor{comment}{!}
1275   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__types}{dc\_calendar\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}, \hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}
1276   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__internal}{dc\_calendar\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}, 
      \hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}, \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}, &
1277     & \hyperlink{namespacedc__calendar__internal_a5aaf74615ddc4b9e53d67d4949c55dd5}{dccaldate\_normalize}, \hyperlink{namespacedc__calendar__internal_a5f6fb926707ca4deb84a454527b8c7f9}{dccaldate\_ym2d}
1278   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__generic}{dc\_calendar\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__calendar__generic_1_1dccaldateinquire}{dccaldateinquire}
1279   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
1280   \textcolor{keywordtype}{implicit none}
1281   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: elapse\_sec
1282                               \textcolor{comment}{! *date* からの経過秒数. }
1283                               \textcolor{comment}{! Elapsed seconds from *date*. }
1284   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: date
1285                               \textcolor{comment}{! 起点となる日時情報を収めたオブジェクト. }
1286                               \textcolor{comment}{! }
1287                               \textcolor{comment}{! An object that stores information of }
1288                               \textcolor{comment}{! date of origin. }
1289   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: cal
1290                               \textcolor{comment}{! 暦情報を収めたオブジェクト. }
1291                               \textcolor{comment}{! }
1292                               \textcolor{comment}{! An object that stores information of }
1293                               \textcolor{comment}{! calendar. }
1294   \textcolor{keywordtype}{real(DP)}:: result
1295                               \textcolor{comment}{! 年始めからの通日. }
1296                               \textcolor{comment}{! Day of year. }
1297 
1298   \textcolor{comment}{! 作業変数}
1299   \textcolor{comment}{! Work variables}
1300   \textcolor{comment}{!}
1301   \textcolor{keywordtype}{integer}:: year, month, day, hour, min
1302   \textcolor{keywordtype}{real(DP)}:: sec
1303   \textcolor{keywordtype}{integer}:: stat
1304   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{pointer}:: datep =>null()
1305   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{pointer}:: calp =>null()
1306 
1307 \textcolor{keywordflow}{continue}
1308 
1309   \textcolor{comment}{! オブジェクトのポインタ割付}
1310   \textcolor{comment}{! Associate pointer of an object}
1311   \textcolor{comment}{!}
1312   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( date ) ) \textcolor{keywordflow}{then}
1313     datep => date
1314   \textcolor{keywordflow}{else}
1315     datep => \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}
1316 \textcolor{keywordflow}{  end if}
1317 
1318   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( cal ) ) \textcolor{keywordflow}{then}
1319     calp => cal
1320   \textcolor{keywordflow}{else}
1321     calp => \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}
1322     \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keyword}{call }\hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}
1323 \textcolor{keywordflow}{  end if}
1324 
1325   \textcolor{comment}{! 初期設定のチェック}
1326   \textcolor{comment}{! Check initialization}
1327   \textcolor{comment}{!}
1328   result = 0.0
1329   \textcolor{keywordflow}{if} ( .not. datep % initialized ) \textcolor{keywordflow}{return}
1330   \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keywordflow}{return}
1331 
1332   \textcolor{comment}{! 経過時間を与えた場合の日時を取得}
1333   \textcolor{comment}{! Inquire date and time when elapse time is given}
1334   \textcolor{comment}{!}
1335   \textcolor{keyword}{call }\hyperlink{interfacedc__calendar__generic_1_1dccaldateinquire}{dccaldateinquire}( year, month, day, hour, min, sec, & \textcolor{comment}{! (out)}
1336       & elapse\_sec = elapse\_sec, date = date , cal = calp )  \textcolor{comment}{! (in)}
1337 
1338   \textcolor{comment}{! 年初めからの通日を取得}
1339   \textcolor{comment}{! Day of year is inquire}
1340   \textcolor{comment}{!}
1341   stat = \hyperlink{namespacedc__calendar__internal_a5f6fb926707ca4deb84a454527b8c7f9}{dccaldate\_ym2d}( year, month, day, calp, & \textcolor{comment}{! (in)}
1342     &                    result )                  \textcolor{comment}{! (out)}
1343 
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dccaldateeval_8f90_a4d237c2c0d85985f4a45ad47accc271d_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{dccaldateeval_8f90_ae40a60950c5d1314c060844625df08af}\label{dccaldateeval_8f90_ae40a60950c5d1314c060844625df08af}} 
\index{dccaldateeval.\+f90@{dccaldateeval.\+f90}!dccaldateevalid1@{dccaldateevalid1}}
\index{dccaldateevalid1@{dccaldateevalid1}!dccaldateeval.\+f90@{dccaldateeval.\+f90}}
\subsubsection{\texorpdfstring{dccaldateevalid1()}{dccaldateevalid1()}}
{\footnotesize\ttfamily subroutine dccaldateevalid1 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+cal\+\_\+date), intent(in)}]{init\+\_\+date,  }\item[{real(dp), intent(in)}]{elapse\+\_\+sec,  }\item[{type(dc\+\_\+cal), intent(in), optional, target}]{cal,  }\item[{type(dc\+\_\+cal\+\_\+date), intent(out), optional, target}]{date,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 414 of file dccaldateeval.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+error\+::dc\+\_\+ealreadyinit, dc\+\_\+error\+::dc\+\_\+ebaddate, dc\+\_\+error\+::dc\+\_\+einconsistcaldate, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+calendar\+\_\+internal\+::dccaldate\+\_\+normalize(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal, dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal\+\_\+set(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+date, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
414   \textcolor{comment}{!}
415   \textcolor{comment}{! 日時の算出と設定を行います. }
416   \textcolor{comment}{!}
417   \textcolor{comment}{! 省略可能引数 *date* が省略された場合には, dc\_calendar 内部で}
418   \textcolor{comment}{! 保持される "dc\_calendar\_types#DC\_CAL\_DATE" 型の変数に日時が}
419   \textcolor{comment}{! 設定されます. その後の手続きで *date* を省略した場合には}
420   \textcolor{comment}{! この日時が使用されます. }
421   \textcolor{comment}{! *date* が省略されない場合にはその変数に日時が設定されます. }
422   \textcolor{comment}{! その日時を使用する場合, 手続きにその "dc\_calendar\_types#DC\_CAL\_DATE" 型の変数}
423   \textcolor{comment}{! を与えてください. }
424   \textcolor{comment}{!}
425   \textcolor{comment}{! 省略可能引数 *cal* が省略された場合には, 経過秒数 *elapse\_sec* }
426   \textcolor{comment}{! の年月日時分への変換に dc\_calendar 内部で保持される暦が用いられます. }
427   \textcolor{comment}{! *cal* が省略されない場合にはその変数に設定された暦が用いられます. }
428   \textcolor{comment}{!}
429   \textcolor{comment}{! Evaluate and set date. }
430   \textcolor{comment}{!}
431   \textcolor{comment}{! If an optional argument *date* is omitted, }
432   \textcolor{comment}{! the date setting is stored to a "dc\_calendar\_types#DC\_CAL\_DATE" }
433   \textcolor{comment}{! variable that is saved in the "dc\_calendar". }
434   \textcolor{comment}{! When *date* is omitted in subsequent procedures, the internal date}
435   \textcolor{comment}{! is used. }
436   \textcolor{comment}{! If *date* is not omitted, the settings is stored to the *date*. }
437   \textcolor{comment}{! In order to use the date setting, use the "dc\_calendar\_types#DC\_CAL\_DATE" }
438   \textcolor{comment}{! varieble to subsequent procedures. }
439   \textcolor{comment}{!}
440   \textcolor{comment}{! If an optional argument *cal* is omitted, }
441   \textcolor{comment}{! information of calendar that is stored in the "dc\_calendar" }
442   \textcolor{comment}{! is used for conversion of elapsed seconds *elapse\_sec* into }
443   \textcolor{comment}{! year-month-day etc.}
444   \textcolor{comment}{! If *cal* is not omitted, information of the variable is used. }
445   \textcolor{comment}{!}
446 
447   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__types}{dc\_calendar\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}, \hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}
448   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__internal}{dc\_calendar\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}, 
      \hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}, \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}, &
449     & \hyperlink{namespacedc__calendar__internal_a5aaf74615ddc4b9e53d67d4949c55dd5}{dccaldate\_normalize}
450   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__generic}{dc\_calendar\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__calendar__generic_1_1dccaldatecreate}{dccaldatecreate}, 
      \hyperlink{interfacedc__calendar__generic_1_1dccaldatetochar}{dccaldatetochar}, \hyperlink{interfacedc__calendar__generic_1_1dccaltochar}{dccaltochar}
451   \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
452   \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
453   \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}, 
      \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, &
454     & \hyperlink{namespacedc__error_af615e5370c2a4be7e491ababe9171027}{dc\_einconsistcaldate}, \hyperlink{namespacedc__error_a3302263a8c976235052a305d54572070}{dc\_ealreadyinit}, 
      \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
455   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
456   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
457   \textcolor{keywordtype}{implicit none}
458   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{intent(in)}:: init\_date
459                               \textcolor{comment}{! 起点となる日時情報を収めたオブジェクト. }
460                               \textcolor{comment}{! }
461                               \textcolor{comment}{! An object that stores information of }
462                               \textcolor{comment}{! date of origin. }
463   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: elapse\_sec
464                               \textcolor{comment}{! *init\_date* からの経過秒数. }
465                               \textcolor{comment}{! Elapsed seconds from *init\_date*. }
466   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: cal
467                               \textcolor{comment}{! 暦情報を収めたオブジェクト. }
468                               \textcolor{comment}{! }
469                               \textcolor{comment}{! An object that stores information of }
470                               \textcolor{comment}{! calendar. }
471   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: date
472                               \textcolor{comment}{! 経過時間後の日時情報を収めたオブジェクト. }
473                               \textcolor{comment}{! }
474                               \textcolor{comment}{! An object that stores information of }
475                               \textcolor{comment}{! date and time after elapsed time. }
476   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
477                               \textcolor{comment}{! 例外処理用フラグ. }
478                               \textcolor{comment}{! デフォルトでは, この手続き内でエラーが}
479                               \textcolor{comment}{! 生じた場合, プログラムは強制終了します. }
480                               \textcolor{comment}{! 引数 *err* が与えられる場合, }
481                               \textcolor{comment}{! プログラムは強制終了せず, 代わりに}
482                               \textcolor{comment}{! *err* に .true. が代入されます. }
483                               \textcolor{comment}{!}
484                               \textcolor{comment}{! Exception handling flag. }
485                               \textcolor{comment}{! By default, when error occur in }
486                               \textcolor{comment}{! this procedure, the program aborts. }
487                               \textcolor{comment}{! If this *err* argument is given, }
488                               \textcolor{comment}{! .true. is substituted to *err* and }
489                               \textcolor{comment}{! the program does not abort. }
490 
491   \textcolor{comment}{! 作業変数}
492   \textcolor{comment}{! Work variables}
493   \textcolor{comment}{!}
494   \textcolor{keywordtype}{integer}:: wyear, wmonth, wday, whour, wmin
495   \textcolor{keywordtype}{real(DP)}:: wsec
496   \textcolor{keywordtype}{character(TOKEN)}:: wzone
497   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{pointer}:: datep =>null()
498   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{pointer}:: calp =>null()
499   \textcolor{keywordtype}{character(STRING)}:: e\_date\_str, e\_cal\_str
500   \textcolor{keywordtype}{integer}:: stat
501   \textcolor{keywordtype}{character(STRING)}:: cause\_c
502   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCCalDateEvalID1'}
503 \textcolor{keywordflow}{continue}
504   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}( subname )
505   stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
506   cause\_c = \textcolor{stringliteral}{''}
507 
508   \textcolor{comment}{! オブジェクトのポインタ割付}
509   \textcolor{comment}{! Associate pointer of an object}
510   \textcolor{comment}{!}
511   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( date ) ) \textcolor{keywordflow}{then}
512     datep => date
513   \textcolor{keywordflow}{else}
514     datep => \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}
515 \textcolor{keywordflow}{  end if}
516 
517   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( cal ) ) \textcolor{keywordflow}{then}
518     calp => cal
519   \textcolor{keywordflow}{else}
520     calp => \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}
521     \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keyword}{call }\hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}
522 \textcolor{keywordflow}{  end if}
523 
524   \textcolor{comment}{! 初期設定のチェック}
525   \textcolor{comment}{! Check initialization}
526   \textcolor{comment}{!}
527 \textcolor{comment}{!!$  if ( .not. datep % initialized ) then}
528 \textcolor{comment}{!!$    stat = DC\_ENOTINIT}
529 \textcolor{comment}{!!$    cause\_c = 'DC\_CAL\_DATE'}
530 \textcolor{comment}{!!$    goto 999}
531 \textcolor{comment}{!!$  end if}
532 
533   \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keywordflow}{then}
534     stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
535     cause\_c = \textcolor{stringliteral}{'DC\_CAL'}
536     \textcolor{keywordflow}{goto} 999
537 \textcolor{keywordflow}{  end if}
538 
539   \textcolor{comment}{! 各要素への値の参照}
540   \textcolor{comment}{! Refer elements}
541   \textcolor{comment}{!}
542   wyear  = init\_date % year
543   wmonth = init\_date % month
544   wday   = init\_date % day
545   whour  = init\_date % hour
546   wmin   = init\_date % min
547   wsec   = init\_date % sec
548   wzone  = init\_date % zone
549 
550   \textcolor{comment}{! 経過時間(秒)の追加}
551   \textcolor{comment}{! Add elapsed time (seconds)}
552   \textcolor{comment}{!}
553 \textcolor{comment}{!!$  if ( elapse\_sec < 0.0\_DP ) then}
554 \textcolor{comment}{!!$    stat = DC\_ENEGATIVE}
555 \textcolor{comment}{!!$    cause\_c = 'elapse\_sec'}
556 \textcolor{comment}{!!$    goto 999}
557 \textcolor{comment}{!!$  end if}
558 
559   wsec = wsec + elapse\_sec
560 
561   \textcolor{comment}{! 日時の正規化}
562   \textcolor{comment}{! Normalize date and time }
563   \textcolor{comment}{!}
564   stat = \hyperlink{namespacedc__calendar__internal_a5aaf74615ddc4b9e53d67d4949c55dd5}{dccaldate\_normalize}( wyear, wmonth, wday, whour, wmin, wsec, & \textcolor{comment}{! (inout)}
565     &                         calp )                                    \textcolor{comment}{! (in)}
566   \textcolor{keywordflow}{if} ( stat == \hyperlink{namespacedc__error_af615e5370c2a4be7e491ababe9171027}{dc\_einconsistcaldate} ) \textcolor{keywordflow}{then}
567     e\_cal\_str = \hyperlink{interfacedc__calendar__generic_1_1dccaltochar}{dccaltochar}( calp )
568     e\_date\_str = \hyperlink{interfacedc__calendar__generic_1_1dccaldatetochar}{dccaldatetochar}( wyear, wmonth, wday, whour, wmin, wsec, zone = \textcolor{stringliteral}{""} )
569     \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'cal=<%c> and date=<%c> are inconsistency'}, &
570       & c1 = trim(e\_cal\_str), c2 = trim(e\_date\_str) )
571     \textcolor{keywordflow}{goto} 999
572 \textcolor{keywordflow}{  end if}
573 
574   \textcolor{comment}{! オブジェクトの作成}
575   \textcolor{comment}{! Create an object}
576   \textcolor{comment}{!}
577   \textcolor{keyword}{call }\hyperlink{interfacedc__calendar__generic_1_1dccaldatecreate}{dccaldatecreate}( &
578     & wyear, wmonth, wday, whour, wmin, wsec, & \textcolor{comment}{! (in)}
579     & datep, zone = wzone, err = err )          \textcolor{comment}{! (out) optional}
580   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(err) ) \textcolor{keywordflow}{then}
581     \textcolor{keywordflow}{if} ( err ) \textcolor{keywordflow}{then}
582       stat = \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}
583       \textcolor{keywordflow}{goto} 999
584 \textcolor{keywordflow}{    end if}
585 \textcolor{keywordflow}{  end if}
586 
587   \textcolor{comment}{! 終了処理, 例外処理}
588   \textcolor{comment}{! Termination and Exception handling}
589   \textcolor{comment}{!}
590 999 \textcolor{keywordflow}{continue}
591   \textcolor{keyword}{nullify}( calp, datep )
592   \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}( stat, subname, err, cause\_c )
593   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}( subname )
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dccaldateeval_8f90_ae40a60950c5d1314c060844625df08af_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{dccaldateeval_8f90_a4e5ec0ff056c24f448f807c6f9c3de14}\label{dccaldateeval_8f90_a4e5ec0ff056c24f448f807c6f9c3de14}} 
\index{dccaldateeval.\+f90@{dccaldateeval.\+f90}!dccaldateevalid2@{dccaldateevalid2}}
\index{dccaldateevalid2@{dccaldateevalid2}!dccaldateeval.\+f90@{dccaldateeval.\+f90}}
\subsubsection{\texorpdfstring{dccaldateevalid2()}{dccaldateevalid2()}}
{\footnotesize\ttfamily subroutine dccaldateevalid2 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+cal\+\_\+date), intent(in)}]{init\+\_\+date,  }\item[{real(dp), intent(in)}]{elapse\+\_\+time,  }\item[{character($\ast$), intent(in)}]{units,  }\item[{type(dc\+\_\+cal), intent(in), optional, target}]{cal,  }\item[{type(dc\+\_\+cal\+\_\+date), intent(out), optional, target}]{date,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 599 of file dccaldateeval.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+error\+::dc\+\_\+ealreadyinit, dc\+\_\+error\+::dc\+\_\+ebaddate, dc\+\_\+error\+::dc\+\_\+ebadunit, dc\+\_\+error\+::dc\+\_\+einconsistcaldate, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+calendar\+\_\+internal\+::dccaldate\+\_\+normalize(), dc\+\_\+calendar\+\_\+internal\+::dccaldate\+\_\+str2usym(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal, dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal\+\_\+set(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+date, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+day, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+hour, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+min, and dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+sec.


\begin{DoxyCode}
599   \textcolor{comment}{!}
600   \textcolor{comment}{! 日時の算出と設定を行います. }
601   \textcolor{comment}{!}
602   \textcolor{comment}{! 省略可能引数 *date* が省略された場合には, dc\_calendar 内部で}
603   \textcolor{comment}{! 保持される "dc\_calendar\_types#DC\_CAL\_DATE" 型の変数に日時が}
604   \textcolor{comment}{! 設定されます. その後の手続きで *date* を省略した場合には}
605   \textcolor{comment}{! この日時が使用されます. }
606   \textcolor{comment}{! *date* が省略されない場合にはその変数に日時が設定されます. }
607   \textcolor{comment}{! その日時を使用する場合, 手続きにその "dc\_calendar\_types#DC\_CAL\_DATE" 型の変数}
608   \textcolor{comment}{! を与えてください. }
609   \textcolor{comment}{!}
610   \textcolor{comment}{! 省略可能引数 *cal* が省略された場合には, 経過時間 *elapse\_time* }
611   \textcolor{comment}{! の年月日時分への変換に dc\_calendar 内部で保持される暦が用いられます. }
612   \textcolor{comment}{! *cal* が省略されない場合にはその変数に設定された暦が用いられます. }
613   \textcolor{comment}{!}
614   \textcolor{comment}{! Evaluate and set date. }
615   \textcolor{comment}{!}
616   \textcolor{comment}{! If an optional argument *date* is omitted, }
617   \textcolor{comment}{! the date setting is stored to a "dc\_calendar\_types#DC\_CAL\_DATE" }
618   \textcolor{comment}{! variable that is saved in the "dc\_calendar". }
619   \textcolor{comment}{! When *date* is omitted in subsequent procedures, the internal date}
620   \textcolor{comment}{! is used. }
621   \textcolor{comment}{! If *date* is not omitted, the settings is stored to the *date*. }
622   \textcolor{comment}{! In order to use the date setting, use the "dc\_calendar\_types#DC\_CAL\_DATE" }
623   \textcolor{comment}{! varieble to subsequent procedures. }
624   \textcolor{comment}{!}
625   \textcolor{comment}{! If an optional argument *cal* is omitted, }
626   \textcolor{comment}{! information of calendar that is stored in the "dc\_calendar" }
627   \textcolor{comment}{! is used for conversion of elapsed time *elapse\_time* into }
628   \textcolor{comment}{! year-month-day etc.}
629   \textcolor{comment}{! If *cal* is not omitted, information of the variable is used. }
630   \textcolor{comment}{!}
631   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__types}{dc\_calendar\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}, \hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}, &
632     & \hyperlink{namespacedc__calendar__types_ab4be572292ddec215a2e956866a4d893}{unit\_symbol\_day}, \hyperlink{namespacedc__calendar__types_ab35dfa690b91efaf7cfc2d056da4629b}{unit\_symbol\_hour}, 
      \hyperlink{namespacedc__calendar__types_ac941d6da4d3fd07f09b543d20796e606}{unit\_symbol\_min}, \hyperlink{namespacedc__calendar__types_a15ce2d6947c7143915fa55b6549d4997}{unit\_symbol\_sec}
633   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__internal}{dc\_calendar\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}, 
      \hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}, \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}, &
634     & \hyperlink{namespacedc__calendar__internal_a5aaf74615ddc4b9e53d67d4949c55dd5}{dccaldate\_normalize}, \hyperlink{namespacedc__calendar__internal_ae2ad5ba61c1d074aea90ec876012150c}{dccaldate\_str2usym}
635   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__generic}{dc\_calendar\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__calendar__generic_1_1dccaldatecreate}{dccaldatecreate}, 
      \hyperlink{interfacedc__calendar__generic_1_1dccaldatetochar}{dccaldatetochar}, \hyperlink{interfacedc__calendar__generic_1_1dccaltochar}{dccaltochar}
636   \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
637   \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
638   \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}, 
      \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, &
639     & \hyperlink{namespacedc__error_af615e5370c2a4be7e491ababe9171027}{dc\_einconsistcaldate}, \hyperlink{namespacedc__error_a3302263a8c976235052a305d54572070}{dc\_ealreadyinit}, 
      \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}, \hyperlink{namespacedc__error_a19b63488d4f7bc5507179bb795640f5f}{dc\_ebadunit}, &
640     & \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
641   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
642   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
643   \textcolor{keywordtype}{implicit none}
644   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{intent(in)}:: init\_date
645                               \textcolor{comment}{! 起点となる日時情報を収めたオブジェクト. }
646                               \textcolor{comment}{! }
647                               \textcolor{comment}{! An object that stores information of }
648                               \textcolor{comment}{! date of origin. }
649   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: elapse\_time
650                               \textcolor{comment}{! *init\_date* からの経過時間. }
651                               \textcolor{comment}{! 単位は *unit* で指定する. }
652                               \textcolor{comment}{!}
653                               \textcolor{comment}{! Elapsed time from *init\_date*. }
654                               \textcolor{comment}{! Unit is specified as *unit*.}
655   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: units
656                               \textcolor{comment}{! *elapse\_time* の単位. }
657                               \textcolor{comment}{!}
658                               \textcolor{comment}{! Unit of *elapse\_time*. }
659   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: cal
660                               \textcolor{comment}{! 暦情報を収めたオブジェクト. }
661                               \textcolor{comment}{! }
662                               \textcolor{comment}{! An object that stores information of }
663                               \textcolor{comment}{! calendar. }
664   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: date
665                               \textcolor{comment}{! 経過時間後の日時情報を収めたオブジェクト. }
666                               \textcolor{comment}{! }
667                               \textcolor{comment}{! An object that stores information of }
668                               \textcolor{comment}{! date and time after elapsed time. }
669   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
670                               \textcolor{comment}{! 例外処理用フラグ. }
671                               \textcolor{comment}{! デフォルトでは, この手続き内でエラーが}
672                               \textcolor{comment}{! 生じた場合, プログラムは強制終了します. }
673                               \textcolor{comment}{! 引数 *err* が与えられる場合, }
674                               \textcolor{comment}{! プログラムは強制終了せず, 代わりに}
675                               \textcolor{comment}{! *err* に .true. が代入されます. }
676                               \textcolor{comment}{!}
677                               \textcolor{comment}{! Exception handling flag. }
678                               \textcolor{comment}{! By default, when error occur in }
679                               \textcolor{comment}{! this procedure, the program aborts. }
680                               \textcolor{comment}{! If this *err* argument is given, }
681                               \textcolor{comment}{! .true. is substituted to *err* and }
682                               \textcolor{comment}{! the program does not abort. }
683 
684   \textcolor{comment}{! 作業変数}
685   \textcolor{comment}{! Work variables}
686   \textcolor{comment}{!}
687   \textcolor{keywordtype}{integer}:: wyear, wmonth, wday, whour, wmin
688   \textcolor{keywordtype}{real(DP)}:: wsec
689   \textcolor{keywordtype}{character(TOKEN)}:: wzone
690   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{pointer}:: datep =>null()
691   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{pointer}:: calp =>null()
692   \textcolor{keywordtype}{character(STRING)}:: e\_date\_str, e\_cal\_str
693   \textcolor{keywordtype}{integer}:: tusym
694   \textcolor{keywordtype}{integer}:: stat
695   \textcolor{keywordtype}{character(STRING)}:: cause\_c
696   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCCalDateEvalID2'}
697 \textcolor{keywordflow}{continue}
698   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}( subname )
699   stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
700   cause\_c = \textcolor{stringliteral}{''}
701 
702   \textcolor{comment}{! オブジェクトのポインタ割付}
703   \textcolor{comment}{! Associate pointer of an object}
704   \textcolor{comment}{!}
705   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( date ) ) \textcolor{keywordflow}{then}
706     datep => date
707   \textcolor{keywordflow}{else}
708     datep => \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}
709 \textcolor{keywordflow}{  end if}
710 
711   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( cal ) ) \textcolor{keywordflow}{then}
712     calp => cal
713   \textcolor{keywordflow}{else}
714     calp => \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}
715     \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keyword}{call }\hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}
716 \textcolor{keywordflow}{  end if}
717 
718   \textcolor{comment}{! 初期設定のチェック}
719   \textcolor{comment}{! Check initialization}
720   \textcolor{comment}{!}
721 \textcolor{comment}{!!$  if ( .not. datep % initialized ) then}
722 \textcolor{comment}{!!$    stat = DC\_ENOTINIT}
723 \textcolor{comment}{!!$    cause\_c = 'DC\_CAL\_DATE'}
724 \textcolor{comment}{!!$    goto 999}
725 \textcolor{comment}{!!$  end if}
726 
727   \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keywordflow}{then}
728     stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
729     cause\_c = \textcolor{stringliteral}{'DC\_CAL'}
730     \textcolor{keywordflow}{goto} 999
731 \textcolor{keywordflow}{  end if}
732 
733   \textcolor{comment}{! 各要素への値の参照}
734   \textcolor{comment}{! Refer elements}
735   \textcolor{comment}{!}
736   wyear  = init\_date % year
737   wmonth = init\_date % month
738   wday   = init\_date % day
739   whour  = init\_date % hour
740   wmin   = init\_date % min
741   wsec   = init\_date % sec
742   wzone  = init\_date % zone
743 
744   \textcolor{comment}{! 経過時間(秒)の追加}
745   \textcolor{comment}{! Add elapsed time (seconds)}
746   \textcolor{comment}{!}
747 \textcolor{comment}{!!$  if ( elapse\_time < 0.0\_DP ) then}
748 \textcolor{comment}{!!$    stat = DC\_ENEGATIVE}
749 \textcolor{comment}{!!$    cause\_c = 'elapse\_time'}
750 \textcolor{comment}{!!$    goto 999}
751 \textcolor{comment}{!!$  end if}
752 
753   tusym = \hyperlink{namespacedc__calendar__internal_ae2ad5ba61c1d074aea90ec876012150c}{dccaldate\_str2usym}(units)
754   \textcolor{keywordflow}{select case}(tusym)
755   \textcolor{keywordflow}{case}(\hyperlink{namespacedc__calendar__types_ab4be572292ddec215a2e956866a4d893}{unit\_symbol\_day})
756     wsec = wsec + elapse\_time * calp % hour\_in\_day &
757       &                       * calp % min\_in\_hour &
758       &                       * calp % sec\_in\_min
759   \textcolor{keywordflow}{case}(\hyperlink{namespacedc__calendar__types_ab35dfa690b91efaf7cfc2d056da4629b}{unit\_symbol\_hour})
760     wsec = wsec + elapse\_time * calp % min\_in\_hour &
761       &                       * calp % sec\_in\_min
762   \textcolor{keywordflow}{case}(\hyperlink{namespacedc__calendar__types_ac941d6da4d3fd07f09b543d20796e606}{unit\_symbol\_min})
763     wsec = wsec + elapse\_time * calp % sec\_in\_min
764   \textcolor{keywordflow}{case}(\hyperlink{namespacedc__calendar__types_a15ce2d6947c7143915fa55b6549d4997}{unit\_symbol\_sec})
765     wsec = wsec + elapse\_time
766 \textcolor{keywordflow}{  case default}
767     cause\_c = units
768     \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'units=<%c> is invalid. (ONLY day,hrs,min,sec are valid)'}
      , &
769       & c1 = trim(units) )
770     stat = \hyperlink{namespacedc__error_a19b63488d4f7bc5507179bb795640f5f}{dc\_ebadunit}
771     \textcolor{keywordflow}{goto} 999
772 \textcolor{keywordflow}{  end select}
773 
774   \textcolor{comment}{! 日時の正規化}
775   \textcolor{comment}{! Normalize date and time }
776   \textcolor{comment}{!}
777   stat = \hyperlink{namespacedc__calendar__internal_a5aaf74615ddc4b9e53d67d4949c55dd5}{dccaldate\_normalize}( wyear, wmonth, wday, whour, wmin, wsec, & \textcolor{comment}{! (inout)}
778     &                         calp )                                    \textcolor{comment}{! (in)}
779   \textcolor{keywordflow}{if} ( stat == \hyperlink{namespacedc__error_af615e5370c2a4be7e491ababe9171027}{dc\_einconsistcaldate} ) \textcolor{keywordflow}{then}
780     e\_cal\_str = \hyperlink{interfacedc__calendar__generic_1_1dccaltochar}{dccaltochar}( calp )
781     e\_date\_str = \hyperlink{interfacedc__calendar__generic_1_1dccaldatetochar}{dccaldatetochar}( wyear, wmonth, wday, whour, wmin, wsec, zone = \textcolor{stringliteral}{""} )
782     \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'cal=<%c> and date=<%c> are inconsistency'}, &
783       & c1 = trim(e\_cal\_str), c2 = trim(e\_date\_str) )
784     \textcolor{keywordflow}{goto} 999
785 \textcolor{keywordflow}{  end if}
786 
787   \textcolor{comment}{! オブジェクトの作成}
788   \textcolor{comment}{! Create an object}
789   \textcolor{comment}{!}
790   \textcolor{keyword}{call }\hyperlink{interfacedc__calendar__generic_1_1dccaldatecreate}{dccaldatecreate}( &
791     & wyear, wmonth, wday, whour, wmin, wsec, & \textcolor{comment}{! (in)}
792     & datep, zone = wzone, err = err )          \textcolor{comment}{! (out) optional}
793   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(err) ) \textcolor{keywordflow}{then}
794     \textcolor{keywordflow}{if} ( err ) \textcolor{keywordflow}{then}
795       stat = \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}
796       \textcolor{keywordflow}{goto} 999
797 \textcolor{keywordflow}{    end if}
798 \textcolor{keywordflow}{  end if}
799 
800   \textcolor{comment}{! 終了処理, 例外処理}
801   \textcolor{comment}{! Termination and Exception handling}
802   \textcolor{comment}{!}
803 999 \textcolor{keywordflow}{continue}
804   \textcolor{keyword}{nullify}( calp, datep )
805   \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}( stat, subname, err, cause\_c )
806   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}( subname )
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dccaldateeval_8f90_a4e5ec0ff056c24f448f807c6f9c3de14_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{dccaldateeval_8f90_af0ce4e4933b13905548659b0bc073348}\label{dccaldateeval_8f90_af0ce4e4933b13905548659b0bc073348}} 
\index{dccaldateeval.\+f90@{dccaldateeval.\+f90}!dccaldateevalsecofday1@{dccaldateevalsecofday1}}
\index{dccaldateevalsecofday1@{dccaldateevalsecofday1}!dccaldateeval.\+f90@{dccaldateeval.\+f90}}
\subsubsection{\texorpdfstring{dccaldateevalsecofday1()}{dccaldateevalsecofday1()}}
{\footnotesize\ttfamily real(dp) function dccaldateevalsecofday1 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{elapse\+\_\+sec,  }\item[{type(dc\+\_\+cal\+\_\+date), intent(in), optional, target}]{date,  }\item[{type(dc\+\_\+cal), intent(in), optional, target}]{cal }\end{DoxyParamCaption})}



Definition at line 1349 of file dccaldateeval.\+f90.



References dc\+\_\+calendar\+\_\+internal\+::dccaldate\+\_\+normalize(), dc\+\_\+calendar\+\_\+internal\+::dccaldate\+\_\+ym2d(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal, dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal\+\_\+set(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+date, and dc\+\_\+types\+::dp.


\begin{DoxyCode}
1349   \textcolor{comment}{! 日始めからの通秒を算出します. }
1350   \textcolor{comment}{! }
1351   \textcolor{comment}{! 省略可能引数 *date* が省略された場合には, dc\_calendar 内部で}
1352   \textcolor{comment}{! 保持される日時が起点の日時として用いられます. }
1353   \textcolor{comment}{! *date* が省略されない場合にはその変数に設定された日時が}
1354   \textcolor{comment}{! 起点の日時として用いられます. }
1355   \textcolor{comment}{!}
1356   \textcolor{comment}{! 省略可能引数 *cal* が省略された場合には, 経過秒数 *elapse\_sec* }
1357   \textcolor{comment}{! の年月日時分への変換に dc\_calendar 内部で保持される暦が用いられます. }
1358   \textcolor{comment}{! *cal* が省略されない場合にはその変数に設定された暦が用いられます. }
1359   \textcolor{comment}{!}
1360   \textcolor{comment}{! Evaluate second of day. }
1361   \textcolor{comment}{! }
1362   \textcolor{comment}{! If an optional argument *date* is omitted, }
1363   \textcolor{comment}{! information of date that is stored in the "dc\_calendar" }
1364   \textcolor{comment}{! is used as date of origin, }
1365   \textcolor{comment}{! If *date* is not omitted, information of the variable is used as }
1366   \textcolor{comment}{! date of origin. }
1367   \textcolor{comment}{!}
1368   \textcolor{comment}{! If an optional argument *cal* is omitted, }
1369   \textcolor{comment}{! information of calendar that is stored in the "dc\_calendar" }
1370   \textcolor{comment}{! is used for conversion of elapsed seconds *elapse\_sec* into }
1371   \textcolor{comment}{! year-month-day etc.}
1372   \textcolor{comment}{! If *cal* is not omitted, information of the variable is used. }
1373   \textcolor{comment}{!}
1374   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__types}{dc\_calendar\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}, \hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}
1375   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__internal}{dc\_calendar\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}, 
      \hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}, \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}, &
1376     & \hyperlink{namespacedc__calendar__internal_a5aaf74615ddc4b9e53d67d4949c55dd5}{dccaldate\_normalize}, \hyperlink{namespacedc__calendar__internal_a5f6fb926707ca4deb84a454527b8c7f9}{dccaldate\_ym2d}
1377   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__generic}{dc\_calendar\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__calendar__generic_1_1dccaldateinquire}{dccaldateinquire}
1378   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
1379   \textcolor{keywordtype}{implicit none}
1380   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: elapse\_sec
1381                               \textcolor{comment}{! *date* からの経過秒数. }
1382                               \textcolor{comment}{! Elapsed seconds from *date*. }
1383   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: date
1384                               \textcolor{comment}{! 起点となる日時情報を収めたオブジェクト. }
1385                               \textcolor{comment}{! }
1386                               \textcolor{comment}{! An object that stores information of }
1387                               \textcolor{comment}{! date of origin. }
1388   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: cal
1389                               \textcolor{comment}{! 暦情報を収めたオブジェクト. }
1390                               \textcolor{comment}{! }
1391                               \textcolor{comment}{! An object that stores information of }
1392                               \textcolor{comment}{! calendar. }
1393   \textcolor{keywordtype}{real(DP)}:: result
1394                               \textcolor{comment}{! 日始めからの通秒. }
1395                               \textcolor{comment}{! Second of day. }
1396 
1397   \textcolor{comment}{! 作業変数}
1398   \textcolor{comment}{! Work variables}
1399   \textcolor{comment}{!}
1400   \textcolor{keywordtype}{integer}:: stat
1401   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{pointer}:: datep =>null()
1402   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{pointer}:: calp =>null()
1403   \textcolor{keywordtype}{integer}:: year, month, day, hour, min
1404   \textcolor{keywordtype}{real(DP)}:: sec
1405 \textcolor{keywordflow}{continue}
1406 
1407   \textcolor{comment}{! オブジェクトのポインタ割付}
1408   \textcolor{comment}{! Associate pointer of an object}
1409   \textcolor{comment}{!}
1410   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( date ) ) \textcolor{keywordflow}{then}
1411     datep => date
1412   \textcolor{keywordflow}{else}
1413     datep => \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}
1414 \textcolor{keywordflow}{  end if}
1415 
1416   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( cal ) ) \textcolor{keywordflow}{then}
1417     calp => cal
1418   \textcolor{keywordflow}{else}
1419     calp => \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}
1420     \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keyword}{call }\hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}
1421 \textcolor{keywordflow}{  end if}
1422 
1423   \textcolor{comment}{! 初期設定のチェック}
1424   \textcolor{comment}{! Check initialization}
1425   \textcolor{comment}{!}
1426   result = 0.0
1427   \textcolor{keywordflow}{if} ( .not. datep % initialized ) \textcolor{keywordflow}{return}
1428   \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keywordflow}{return}
1429 
1430   \textcolor{comment}{! 経過時間を与えた場合の日時を取得}
1431   \textcolor{comment}{! Inquire date and time when elapse time is given}
1432   \textcolor{comment}{!}
1433   \textcolor{keyword}{call }\hyperlink{interfacedc__calendar__generic_1_1dccaldateinquire}{dccaldateinquire}( year, month, day, hour, min, sec, & \textcolor{comment}{! (out)}
1434       & elapse\_sec = elapse\_sec, date = date , cal = calp )  \textcolor{comment}{! (in)}
1435 
1436   \textcolor{comment}{! 通秒へ変換}
1437   \textcolor{comment}{! Convert into sec of year}
1438   \textcolor{comment}{!}
1439   result = &
1440       &                   hour * calp % min\_in\_hour &
1441       &                        * calp % sec\_in\_min  &
1442       &                 + min  * calp % sec\_in\_min  &
1443       &                 + sec
1444 
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dccaldateeval_8f90_af0ce4e4933b13905548659b0bc073348_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{dccaldateeval_8f90_a8fc8208eadddb4f57b904ac89618f013}\label{dccaldateeval_8f90_a8fc8208eadddb4f57b904ac89618f013}} 
\index{dccaldateeval.\+f90@{dccaldateeval.\+f90}!dccaldateevalsecofyear1@{dccaldateevalsecofyear1}}
\index{dccaldateevalsecofyear1@{dccaldateevalsecofyear1}!dccaldateeval.\+f90@{dccaldateeval.\+f90}}
\subsubsection{\texorpdfstring{dccaldateevalsecofyear1()}{dccaldateevalsecofyear1()}}
{\footnotesize\ttfamily real(dp) function dccaldateevalsecofyear1 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{elapse\+\_\+sec,  }\item[{type(dc\+\_\+cal\+\_\+date), intent(in), optional, target}]{date,  }\item[{type(dc\+\_\+cal), intent(in), optional, target}]{cal }\end{DoxyParamCaption})}



Definition at line 1140 of file dccaldateeval.\+f90.



References dc\+\_\+calendar\+\_\+internal\+::dccaldate\+\_\+normalize(), dc\+\_\+calendar\+\_\+internal\+::dccaldate\+\_\+ym2d(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal, dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal\+\_\+set(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+date, and dc\+\_\+types\+::dp.


\begin{DoxyCode}
1140   \textcolor{comment}{! 年始めからの通秒を算出します. }
1141   \textcolor{comment}{! }
1142   \textcolor{comment}{! 省略可能引数 *date* が省略された場合には, dc\_calendar 内部で}
1143   \textcolor{comment}{! 保持される日時が起点の日時として用いられます. }
1144   \textcolor{comment}{! *date* が省略されない場合にはその変数に設定された日時が}
1145   \textcolor{comment}{! 起点の日時として用いられます. }
1146   \textcolor{comment}{!}
1147   \textcolor{comment}{! 省略可能引数 *cal* が省略された場合には, 経過秒数 *elapse\_sec* }
1148   \textcolor{comment}{! の年月日時分への変換に dc\_calendar 内部で保持される暦が用いられます. }
1149   \textcolor{comment}{! *cal* が省略されない場合にはその変数に設定された暦が用いられます. }
1150   \textcolor{comment}{!}
1151   \textcolor{comment}{! Evaluate second of year. }
1152   \textcolor{comment}{! }
1153   \textcolor{comment}{! If an optional argument *date* is omitted, }
1154   \textcolor{comment}{! information of date that is stored in the "dc\_calendar" }
1155   \textcolor{comment}{! is used as date of origin, }
1156   \textcolor{comment}{! If *date* is not omitted, information of the variable is used as }
1157   \textcolor{comment}{! date of origin. }
1158   \textcolor{comment}{!}
1159   \textcolor{comment}{! If an optional argument *cal* is omitted, }
1160   \textcolor{comment}{! information of calendar that is stored in the "dc\_calendar" }
1161   \textcolor{comment}{! is used for conversion of elapsed seconds *elapse\_sec* into }
1162   \textcolor{comment}{! year-month-day etc.}
1163   \textcolor{comment}{! If *cal* is not omitted, information of the variable is used. }
1164   \textcolor{comment}{!}
1165   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__types}{dc\_calendar\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}, \hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}
1166   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__internal}{dc\_calendar\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}, 
      \hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}, \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}, &
1167     & \hyperlink{namespacedc__calendar__internal_a5aaf74615ddc4b9e53d67d4949c55dd5}{dccaldate\_normalize}, \hyperlink{namespacedc__calendar__internal_a5f6fb926707ca4deb84a454527b8c7f9}{dccaldate\_ym2d}
1168   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__generic}{dc\_calendar\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__calendar__generic_1_1dccaldateinquire}{dccaldateinquire}, 
      \hyperlink{interfacedc__calendar__generic_1_1dccaldateevaldayofyear}{dccaldateevaldayofyear}
1169   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
1170   \textcolor{keywordtype}{implicit none}
1171   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: elapse\_sec
1172                               \textcolor{comment}{! *date* からの経過秒数. }
1173                               \textcolor{comment}{! Elapsed seconds from *date*. }
1174   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: date
1175                               \textcolor{comment}{! 起点となる日時情報を収めたオブジェクト. }
1176                               \textcolor{comment}{! }
1177                               \textcolor{comment}{! An object that stores information of }
1178                               \textcolor{comment}{! date of origin. }
1179   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: cal
1180                               \textcolor{comment}{! 暦情報を収めたオブジェクト. }
1181                               \textcolor{comment}{! }
1182                               \textcolor{comment}{! An object that stores information of }
1183                               \textcolor{comment}{! calendar. }
1184   \textcolor{keywordtype}{real(DP)}:: result
1185                               \textcolor{comment}{! 年始めからの通秒. }
1186                               \textcolor{comment}{! Second of year. }
1187 
1188   \textcolor{comment}{! 作業変数}
1189   \textcolor{comment}{! Work variables}
1190   \textcolor{comment}{!}
1191   \textcolor{keywordtype}{real(DP)}:: day\_of\_year
1192   \textcolor{keywordtype}{integer}:: stat
1193   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{pointer}:: datep =>null()
1194   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{pointer}:: calp =>null()
1195   \textcolor{keywordtype}{integer}:: year, month, day, hour, min
1196   \textcolor{keywordtype}{real(DP)}:: sec
1197 \textcolor{keywordflow}{continue}
1198 
1199   \textcolor{comment}{! オブジェクトのポインタ割付}
1200   \textcolor{comment}{! Associate pointer of an object}
1201   \textcolor{comment}{!}
1202   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( date ) ) \textcolor{keywordflow}{then}
1203     datep => date
1204   \textcolor{keywordflow}{else}
1205     datep => \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}
1206 \textcolor{keywordflow}{  end if}
1207 
1208   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( cal ) ) \textcolor{keywordflow}{then}
1209     calp => cal
1210   \textcolor{keywordflow}{else}
1211     calp => \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}
1212     \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keyword}{call }\hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}
1213 \textcolor{keywordflow}{  end if}
1214 
1215   \textcolor{comment}{! 初期設定のチェック}
1216   \textcolor{comment}{! Check initialization}
1217   \textcolor{comment}{!}
1218   result = 0.0
1219   \textcolor{keywordflow}{if} ( .not. datep % initialized ) \textcolor{keywordflow}{return}
1220   \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keywordflow}{return}
1221 
1222   \textcolor{comment}{! 経過時間を与えた場合の日時を取得}
1223   \textcolor{comment}{! Inquire date and time when elapse time is given}
1224   \textcolor{comment}{!}
1225   \textcolor{keyword}{call }\hyperlink{interfacedc__calendar__generic_1_1dccaldateinquire}{dccaldateinquire}( year, month, day, hour, min, sec, & \textcolor{comment}{! (out)}
1226       & elapse\_sec = elapse\_sec, date = date , cal = calp )  \textcolor{comment}{! (in)}
1227 
1228   \textcolor{comment}{! 年初めからの通日を取得}
1229   \textcolor{comment}{! Day of year is inquire}
1230   \textcolor{comment}{!}
1231   stat = \hyperlink{namespacedc__calendar__internal_a5f6fb926707ca4deb84a454527b8c7f9}{dccaldate\_ym2d}( year, month, day, calp, & \textcolor{comment}{! (in)}
1232     &                    day\_of\_year )             \textcolor{comment}{! (out)}
1233 
1234   \textcolor{comment}{! 通秒へ変換}
1235   \textcolor{comment}{! Convert into sec of year}
1236   \textcolor{comment}{!}
1237   result = ( day\_of\_year - 1 ) * calp % hour\_in\_day &
1238       &                        * calp % min\_in\_hour &
1239       &                        * calp % sec\_in\_min  &
1240       &                 + hour * calp % min\_in\_hour &
1241       &                        * calp % sec\_in\_min  &
1242       &                 + min  * calp % sec\_in\_min  &
1243       &                 + sec
1244 
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dccaldateeval_8f90_a8fc8208eadddb4f57b904ac89618f013_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{dccaldateeval_8f90_ad9a7632451f894d8edd2e140bc9da77c}\label{dccaldateeval_8f90_ad9a7632451f894d8edd2e140bc9da77c}} 
\index{dccaldateeval.\+f90@{dccaldateeval.\+f90}!dccaldateevalym2ym1@{dccaldateevalym2ym1}}
\index{dccaldateevalym2ym1@{dccaldateevalym2ym1}!dccaldateeval.\+f90@{dccaldateeval.\+f90}}
\subsubsection{\texorpdfstring{dccaldateevalym2ym1()}{dccaldateevalym2ym1()}}
{\footnotesize\ttfamily subroutine dccaldateevalym2ym1 (\begin{DoxyParamCaption}\item[{integer, intent(in)}]{year1,  }\item[{integer, intent(in)}]{month1,  }\item[{integer, intent(in)}]{day1,  }\item[{integer, intent(in)}]{hour1,  }\item[{integer, intent(in)}]{min1,  }\item[{real(dp), intent(in)}]{sec1,  }\item[{real(dp), intent(in)}]{elapse\+\_\+sec,  }\item[{integer, intent(out)}]{year2,  }\item[{integer, intent(out)}]{month2,  }\item[{integer, intent(out)}]{day2,  }\item[{integer, intent(out)}]{hour2,  }\item[{integer, intent(out)}]{min2,  }\item[{real(dp), intent(out)}]{sec2,  }\item[{type(dc\+\_\+cal), intent(in), optional, target}]{cal,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 816 of file dccaldateeval.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+error\+::dc\+\_\+ealreadyinit, dc\+\_\+error\+::dc\+\_\+ebaddate, dc\+\_\+error\+::dc\+\_\+einconsistcaldate, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+calendar\+\_\+internal\+::dccaldate\+\_\+normalize(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal, dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal\+\_\+set(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+date, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
816   \textcolor{comment}{!}
817   \textcolor{comment}{! 日時の算出と設定を行います. }
818   \textcolor{comment}{!}
819   \textcolor{comment}{! 省略可能引数 *cal* が省略された場合には, 経過秒数 *elapse\_sec* }
820   \textcolor{comment}{! の年月日時分への変換に dc\_calendar 内部で保持される暦が用いられます. }
821   \textcolor{comment}{! *cal* が省略されない場合にはその変数に設定された暦が用いられます. }
822   \textcolor{comment}{!}
823   \textcolor{comment}{! Evaluate and set date. }
824   \textcolor{comment}{!}
825   \textcolor{comment}{! If an optional argument *cal* is omitted, }
826   \textcolor{comment}{! information of calendar that is stored in the "dc\_calendar" }
827   \textcolor{comment}{! is used for conversion of elapsed seconds *elapse\_sec* into }
828   \textcolor{comment}{! year-month-day etc.}
829   \textcolor{comment}{! If *cal* is not omitted, information of the variable is used. }
830   \textcolor{comment}{!}
831   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__types}{dc\_calendar\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}, \hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}
832   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__internal}{dc\_calendar\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}, 
      \hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}, \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}, &
833     & \hyperlink{namespacedc__calendar__internal_a5aaf74615ddc4b9e53d67d4949c55dd5}{dccaldate\_normalize}
834   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__generic}{dc\_calendar\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__calendar__generic_1_1dccaldatecreate}{dccaldatecreate}, 
      \hyperlink{interfacedc__calendar__generic_1_1dccaldatetochar}{dccaldatetochar}, \hyperlink{interfacedc__calendar__generic_1_1dccaltochar}{dccaltochar}
835   \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
836   \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
837   \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}, 
      \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, &
838     & \hyperlink{namespacedc__error_af615e5370c2a4be7e491ababe9171027}{dc\_einconsistcaldate}, \hyperlink{namespacedc__error_a3302263a8c976235052a305d54572070}{dc\_ealreadyinit}, 
      \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
839   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
840   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
841   \textcolor{keywordtype}{implicit none}
842   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: year1  \textcolor{comment}{! 起点の年. Year of origin.}
843   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: month1 \textcolor{comment}{! 起点の月. Month of origin.}
844   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: day1   \textcolor{comment}{! 起点の日. Day of origin.}
845   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: hour1  \textcolor{comment}{! 起点の時. Hour of origin.}
846   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: min1   \textcolor{comment}{! 起点の分. Minute of origin.}
847   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: sec1  \textcolor{comment}{! 起点の秒. Second of origin.}
848   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: elapse\_sec
849                               \textcolor{comment}{! *year1* 〜 *sec1* からの経過秒数. }
850                               \textcolor{comment}{! Elapsed seconds from *year1* -- *sec1*}
851   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: year2  \textcolor{comment}{! 経過時間後の年. Year after elapsed time.}
852   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: month2 \textcolor{comment}{! 経過時間後の月. Month after elapsed time.}
853   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: day2   \textcolor{comment}{! 経過時間後の日. Day after elapsed time.}
854   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: hour2  \textcolor{comment}{! 経過時間後の時. Hour after elapsed time.}
855   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: min2   \textcolor{comment}{! 経過時間後の分. Minute after elapsed time.}
856   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(out)}:: sec2  \textcolor{comment}{! 経過時間後の秒. Second after elapsed time.}
857   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: cal
858                               \textcolor{comment}{! 暦情報を収めたオブジェクト. }
859                               \textcolor{comment}{! }
860                               \textcolor{comment}{! An object that stores information of }
861                               \textcolor{comment}{! calendar. }
862   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
863                               \textcolor{comment}{! 例外処理用フラグ. }
864                               \textcolor{comment}{! デフォルトでは, この手続き内でエラーが}
865                               \textcolor{comment}{! 生じた場合, プログラムは強制終了します. }
866                               \textcolor{comment}{! 引数 *err* が与えられる場合, }
867                               \textcolor{comment}{! プログラムは強制終了せず, 代わりに}
868                               \textcolor{comment}{! *err* に .true. が代入されます. }
869                               \textcolor{comment}{!}
870                               \textcolor{comment}{! Exception handling flag. }
871                               \textcolor{comment}{! By default, when error occur in }
872                               \textcolor{comment}{! this procedure, the program aborts. }
873                               \textcolor{comment}{! If this *err* argument is given, }
874                               \textcolor{comment}{! .true. is substituted to *err* and }
875                               \textcolor{comment}{! the program does not abort. }
876 
877   \textcolor{comment}{! 作業変数}
878   \textcolor{comment}{! Work variables}
879   \textcolor{comment}{!}
880   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{pointer}:: calp =>null()
881   \textcolor{keywordtype}{character(STRING)}:: e\_date\_str, e\_cal\_str
882   \textcolor{keywordtype}{integer}:: stat
883   \textcolor{keywordtype}{character(STRING)}:: cause\_c
884   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCCalDateEvalYM2YM1'}
885 \textcolor{keywordflow}{continue}
886   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}( subname )
887   stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
888   cause\_c = \textcolor{stringliteral}{''}
889 
890   \textcolor{comment}{! オブジェクトのポインタ割付}
891   \textcolor{comment}{! Associate pointer of an object}
892   \textcolor{comment}{!}
893   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( cal ) ) \textcolor{keywordflow}{then}
894     calp => cal
895   \textcolor{keywordflow}{else}
896     calp => \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}
897     \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keyword}{call }\hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}
898 \textcolor{keywordflow}{  end if}
899 
900   \textcolor{comment}{! 初期設定のチェック}
901   \textcolor{comment}{! Check initialization}
902   \textcolor{comment}{!}
903 \textcolor{comment}{!!$  if ( .not. datep % initialized ) then}
904 \textcolor{comment}{!!$    stat = DC\_ENOTINIT}
905 \textcolor{comment}{!!$    cause\_c = 'DC\_CAL\_DATE'}
906 \textcolor{comment}{!!$    goto 999}
907 \textcolor{comment}{!!$  end if}
908 
909   \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keywordflow}{then}
910     stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
911     cause\_c = \textcolor{stringliteral}{'DC\_CAL'}
912     \textcolor{keywordflow}{goto} 999
913 \textcolor{keywordflow}{  end if}
914 
915   \textcolor{comment}{! 各要素への値の参照}
916   \textcolor{comment}{! Refer elements}
917   \textcolor{comment}{!}
918   year2  = year1
919   month2 = month1
920   day2   = day1
921   hour2  = hour1
922   min2   = min1
923   sec2   = sec1
924 
925   \textcolor{comment}{! 経過時間(秒)の追加}
926   \textcolor{comment}{! Add elapsed time (seconds)}
927   \textcolor{comment}{!}
928 \textcolor{comment}{!!$  if ( elapse\_sec < 0.0\_DP ) then}
929 \textcolor{comment}{!!$    stat = DC\_ENEGATIVE}
930 \textcolor{comment}{!!$    cause\_c = 'elapse\_sec'}
931 \textcolor{comment}{!!$    goto 999}
932 \textcolor{comment}{!!$  end if}
933 
934   sec2 = sec2 + elapse\_sec
935 
936   \textcolor{comment}{! 日時の正規化}
937   \textcolor{comment}{! Normalize date and time }
938   \textcolor{comment}{!}
939   stat = \hyperlink{namespacedc__calendar__internal_a5aaf74615ddc4b9e53d67d4949c55dd5}{dccaldate\_normalize}( year2, month2, day2, hour2, min2, sec2, & \textcolor{comment}{! (inout)}
940     &                         calp )                                    \textcolor{comment}{! (in)}
941   \textcolor{keywordflow}{if} ( stat == \hyperlink{namespacedc__error_af615e5370c2a4be7e491ababe9171027}{dc\_einconsistcaldate} ) \textcolor{keywordflow}{then}
942     e\_cal\_str = \hyperlink{interfacedc__calendar__generic_1_1dccaltochar}{dccaltochar}( calp )
943     e\_date\_str = \hyperlink{interfacedc__calendar__generic_1_1dccaldatetochar}{dccaldatetochar}( year2, month2, day2, hour2, min2, sec2, zone = \textcolor{stringliteral}{""} )
944     \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'cal=<%c> and date=<%c> are inconsistency'}, &
945       & c1 = trim(e\_cal\_str), c2 = trim(e\_date\_str) )
946     \textcolor{keywordflow}{goto} 999
947 \textcolor{keywordflow}{  end if}
948 
949   \textcolor{comment}{! 終了処理, 例外処理}
950   \textcolor{comment}{! Termination and Exception handling}
951   \textcolor{comment}{!}
952 999 \textcolor{keywordflow}{continue}
953   \textcolor{keyword}{nullify}( calp )
954   \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}( stat, subname, err, cause\_c )
955   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}( subname )
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dccaldateeval_8f90_ad9a7632451f894d8edd2e140bc9da77c_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{dccaldateeval_8f90_adfd92e4e46bcfe6c30d007ca03d574c7}\label{dccaldateeval_8f90_adfd92e4e46bcfe6c30d007ca03d574c7}} 
\index{dccaldateeval.\+f90@{dccaldateeval.\+f90}!dccaldateevalym2ym2@{dccaldateevalym2ym2}}
\index{dccaldateevalym2ym2@{dccaldateevalym2ym2}!dccaldateeval.\+f90@{dccaldateeval.\+f90}}
\subsubsection{\texorpdfstring{dccaldateevalym2ym2()}{dccaldateevalym2ym2()}}
{\footnotesize\ttfamily subroutine dccaldateevalym2ym2 (\begin{DoxyParamCaption}\item[{integer, intent(in)}]{year1,  }\item[{integer, intent(in)}]{month1,  }\item[{integer, intent(in)}]{day1,  }\item[{integer, intent(in)}]{hour1,  }\item[{integer, intent(in)}]{min1,  }\item[{real(dp), intent(in)}]{sec1,  }\item[{real(dp), intent(in)}]{elapse\+\_\+time,  }\item[{character($\ast$), intent(in)}]{units,  }\item[{integer, intent(out)}]{year2,  }\item[{integer, intent(out)}]{month2,  }\item[{integer, intent(out)}]{day2,  }\item[{integer, intent(out)}]{hour2,  }\item[{integer, intent(out)}]{min2,  }\item[{real(dp), intent(out)}]{sec2,  }\item[{type(dc\+\_\+cal), intent(in), optional, target}]{cal,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 965 of file dccaldateeval.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+error\+::dc\+\_\+ealreadyinit, dc\+\_\+error\+::dc\+\_\+ebaddate, dc\+\_\+error\+::dc\+\_\+ebadunit, dc\+\_\+error\+::dc\+\_\+einconsistcaldate, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+calendar\+\_\+internal\+::dccaldate\+\_\+normalize(), dc\+\_\+calendar\+\_\+internal\+::dccaldate\+\_\+str2usym(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal, dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal\+\_\+set(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+date, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+day, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+hour, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+min, and dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+sec.


\begin{DoxyCode}
965   \textcolor{comment}{!}
966   \textcolor{comment}{! 日時の算出と設定を行います. }
967   \textcolor{comment}{!}
968   \textcolor{comment}{! 省略可能引数 *cal* が省略された場合には, 経過時間 *elapse\_time* }
969   \textcolor{comment}{! の年月日時分への変換に dc\_calendar 内部で保持される暦が用いられます. }
970   \textcolor{comment}{! *cal* が省略されない場合にはその変数に設定された暦が用いられます. }
971   \textcolor{comment}{!}
972   \textcolor{comment}{! Evaluate and set date. }
973   \textcolor{comment}{!}
974   \textcolor{comment}{! If an optional argument *cal* is omitted, }
975   \textcolor{comment}{! information of calendar that is stored in the "dc\_calendar" }
976   \textcolor{comment}{! is used for conversion of elapsed time *elapse\_time* into }
977   \textcolor{comment}{! year-month-day etc.}
978   \textcolor{comment}{! If *cal* is not omitted, information of the variable is used. }
979   \textcolor{comment}{!}
980   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__types}{dc\_calendar\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}, \hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}, &
981     & \hyperlink{namespacedc__calendar__types_ab4be572292ddec215a2e956866a4d893}{unit\_symbol\_day}, \hyperlink{namespacedc__calendar__types_ab35dfa690b91efaf7cfc2d056da4629b}{unit\_symbol\_hour}, 
      \hyperlink{namespacedc__calendar__types_ac941d6da4d3fd07f09b543d20796e606}{unit\_symbol\_min}, \hyperlink{namespacedc__calendar__types_a15ce2d6947c7143915fa55b6549d4997}{unit\_symbol\_sec}
982   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__internal}{dc\_calendar\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}, 
      \hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}, \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}, &
983     & \hyperlink{namespacedc__calendar__internal_a5aaf74615ddc4b9e53d67d4949c55dd5}{dccaldate\_normalize}, \hyperlink{namespacedc__calendar__internal_ae2ad5ba61c1d074aea90ec876012150c}{dccaldate\_str2usym}
984   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__generic}{dc\_calendar\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__calendar__generic_1_1dccaldatecreate}{dccaldatecreate}, 
      \hyperlink{interfacedc__calendar__generic_1_1dccaldatetochar}{dccaldatetochar}, \hyperlink{interfacedc__calendar__generic_1_1dccaltochar}{dccaltochar}
985   \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
986   \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
987   \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}, 
      \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, &
988     & \hyperlink{namespacedc__error_af615e5370c2a4be7e491ababe9171027}{dc\_einconsistcaldate}, \hyperlink{namespacedc__error_a3302263a8c976235052a305d54572070}{dc\_ealreadyinit}, 
      \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}, \hyperlink{namespacedc__error_a19b63488d4f7bc5507179bb795640f5f}{dc\_ebadunit}, &
989     & \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
990   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
991   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
992   \textcolor{keywordtype}{implicit none}
993 
994   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: year1  \textcolor{comment}{! 起点の年. Year of origin.}
995   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: month1 \textcolor{comment}{! 起点の月. Month of origin.}
996   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: day1   \textcolor{comment}{! 起点の日. Day of origin.}
997   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: hour1  \textcolor{comment}{! 起点の時. Hour of origin.}
998   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: min1   \textcolor{comment}{! 起点の分. Minute of origin.}
999   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: sec1  \textcolor{comment}{! 起点の秒. Second of origin.}
1000   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: elapse\_time
1001                               \textcolor{comment}{! *year1* 〜 *sec1* からの経過時間. }
1002                               \textcolor{comment}{! 単位は *unit* で指定する. }
1003                               \textcolor{comment}{!}
1004                               \textcolor{comment}{! Elapsed time from *year1* -- *sec1*}
1005                               \textcolor{comment}{! Unit is specified as *unit*.}
1006   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: units
1007                               \textcolor{comment}{! *elapse\_time* の単位. }
1008                               \textcolor{comment}{!}
1009                               \textcolor{comment}{! Unit of *elapse\_time*. }
1010   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: year2  \textcolor{comment}{! 経過時間後の年. Year after elapsed time.}
1011   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: month2 \textcolor{comment}{! 経過時間後の月. Month after elapsed time.}
1012   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: day2   \textcolor{comment}{! 経過時間後の日. Day after elapsed time.}
1013   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: hour2  \textcolor{comment}{! 経過時間後の時. Hour after elapsed time.}
1014   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: min2   \textcolor{comment}{! 経過時間後の分. Minute after elapsed time.}
1015   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(out)}:: sec2  \textcolor{comment}{! 経過時間後の秒. Second after elapsed time.}
1016   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: cal
1017                               \textcolor{comment}{! 暦情報を収めたオブジェクト. }
1018                               \textcolor{comment}{! }
1019                               \textcolor{comment}{! An object that stores information of }
1020                               \textcolor{comment}{! calendar. }
1021   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
1022                               \textcolor{comment}{! 例外処理用フラグ. }
1023                               \textcolor{comment}{! デフォルトでは, この手続き内でエラーが}
1024                               \textcolor{comment}{! 生じた場合, プログラムは強制終了します. }
1025                               \textcolor{comment}{! 引数 *err* が与えられる場合, }
1026                               \textcolor{comment}{! プログラムは強制終了せず, 代わりに}
1027                               \textcolor{comment}{! *err* に .true. が代入されます. }
1028                               \textcolor{comment}{!}
1029                               \textcolor{comment}{! Exception handling flag. }
1030                               \textcolor{comment}{! By default, when error occur in }
1031                               \textcolor{comment}{! this procedure, the program aborts. }
1032                               \textcolor{comment}{! If this *err* argument is given, }
1033                               \textcolor{comment}{! .true. is substituted to *err* and }
1034                               \textcolor{comment}{! the program does not abort. }
1035 
1036   \textcolor{comment}{! 作業変数}
1037   \textcolor{comment}{! Work variables}
1038   \textcolor{comment}{!}
1039   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{pointer}:: calp =>null()
1040   \textcolor{keywordtype}{character(STRING)}:: e\_date\_str, e\_cal\_str
1041   \textcolor{keywordtype}{integer}:: tusym
1042   \textcolor{keywordtype}{integer}:: stat
1043   \textcolor{keywordtype}{character(STRING)}:: cause\_c
1044   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCCalDateEvalYM2YM1'}
1045 \textcolor{keywordflow}{continue}
1046   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}( subname )
1047   stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
1048   cause\_c = \textcolor{stringliteral}{''}
1049 
1050   \textcolor{comment}{! オブジェクトのポインタ割付}
1051   \textcolor{comment}{! Associate pointer of an object}
1052   \textcolor{comment}{!}
1053   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( cal ) ) \textcolor{keywordflow}{then}
1054     calp => cal
1055   \textcolor{keywordflow}{else}
1056     calp => \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}
1057     \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keyword}{call }\hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}
1058 \textcolor{keywordflow}{  end if}
1059 
1060   \textcolor{comment}{! 初期設定のチェック}
1061   \textcolor{comment}{! Check initialization}
1062   \textcolor{comment}{!}
1063 \textcolor{comment}{!!$  if ( .not. datep % initialized ) then}
1064 \textcolor{comment}{!!$    stat = DC\_ENOTINIT}
1065 \textcolor{comment}{!!$    cause\_c = 'DC\_CAL\_DATE'}
1066 \textcolor{comment}{!!$    goto 999}
1067 \textcolor{comment}{!!$  end if}
1068 
1069   \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keywordflow}{then}
1070     stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
1071     cause\_c = \textcolor{stringliteral}{'DC\_CAL'}
1072     \textcolor{keywordflow}{goto} 999
1073 \textcolor{keywordflow}{  end if}
1074 
1075   \textcolor{comment}{! 各要素への値の参照}
1076   \textcolor{comment}{! Refer elements}
1077   \textcolor{comment}{!}
1078   year2  = year1
1079   month2 = month1
1080   day2   = day1
1081   hour2  = hour1
1082   min2   = min1
1083   sec2   = sec1
1084 
1085   \textcolor{comment}{! 経過時間(秒)の追加}
1086   \textcolor{comment}{! Add elapsed time (seconds)}
1087   \textcolor{comment}{!}
1088 \textcolor{comment}{!!$  if ( elapse\_time < 0.0\_DP ) then}
1089 \textcolor{comment}{!!$    stat = DC\_ENEGATIVE}
1090 \textcolor{comment}{!!$    cause\_c = 'elapse\_time'}
1091 \textcolor{comment}{!!$    goto 999}
1092 \textcolor{comment}{!!$  end if}
1093 
1094   tusym = \hyperlink{namespacedc__calendar__internal_ae2ad5ba61c1d074aea90ec876012150c}{dccaldate\_str2usym}(units)
1095   \textcolor{keywordflow}{select case}(tusym)
1096   \textcolor{keywordflow}{case}(\hyperlink{namespacedc__calendar__types_ab4be572292ddec215a2e956866a4d893}{unit\_symbol\_day})
1097     sec2 = sec2 + elapse\_time * calp % hour\_in\_day &
1098       &                       * calp % min\_in\_hour &
1099       &                       * calp % sec\_in\_min
1100   \textcolor{keywordflow}{case}(\hyperlink{namespacedc__calendar__types_ab35dfa690b91efaf7cfc2d056da4629b}{unit\_symbol\_hour})
1101     sec2 = sec2 + elapse\_time * calp % min\_in\_hour &
1102       &                       * calp % sec\_in\_min
1103   \textcolor{keywordflow}{case}(\hyperlink{namespacedc__calendar__types_ac941d6da4d3fd07f09b543d20796e606}{unit\_symbol\_min})
1104     sec2 = sec2 + elapse\_time * calp % sec\_in\_min
1105   \textcolor{keywordflow}{case}(\hyperlink{namespacedc__calendar__types_a15ce2d6947c7143915fa55b6549d4997}{unit\_symbol\_sec})
1106     sec2 = sec2 + elapse\_time
1107 \textcolor{keywordflow}{  case default}
1108     cause\_c = units
1109     \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'units=<%c> is invalid. (ONLY day,hour,min,sec are
       valid)'}, &
1110       & c1 = trim(units) )
1111     stat = \hyperlink{namespacedc__error_a19b63488d4f7bc5507179bb795640f5f}{dc\_ebadunit}
1112     \textcolor{keywordflow}{goto} 999
1113 \textcolor{keywordflow}{  end select}
1114 
1115   \textcolor{comment}{! 日時の正規化}
1116   \textcolor{comment}{! Normalize date and time }
1117   \textcolor{comment}{!}
1118   stat = \hyperlink{namespacedc__calendar__internal_a5aaf74615ddc4b9e53d67d4949c55dd5}{dccaldate\_normalize}( year2, month2, day2, hour2, min2, sec2, & \textcolor{comment}{! (inout)}
1119     &                         calp )                                    \textcolor{comment}{! (in)}
1120   \textcolor{keywordflow}{if} ( stat == \hyperlink{namespacedc__error_af615e5370c2a4be7e491ababe9171027}{dc\_einconsistcaldate} ) \textcolor{keywordflow}{then}
1121     e\_cal\_str = \hyperlink{interfacedc__calendar__generic_1_1dccaltochar}{dccaltochar}( calp )
1122     e\_date\_str = \hyperlink{interfacedc__calendar__generic_1_1dccaldatetochar}{dccaldatetochar}( year2, month2, day2, hour2, min2, sec2, zone = \textcolor{stringliteral}{""} )
1123     \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'cal=<%c> and date=<%c> are inconsistency'}, &
1124       & c1 = trim(e\_cal\_str), c2 = trim(e\_date\_str) )
1125     \textcolor{keywordflow}{goto} 999
1126 \textcolor{keywordflow}{  end if}
1127 
1128   \textcolor{comment}{! 終了処理, 例外処理}
1129   \textcolor{comment}{! Termination and Exception handling}
1130   \textcolor{comment}{!}
1131 999 \textcolor{keywordflow}{continue}
1132   \textcolor{keyword}{nullify}( calp )
1133   \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}( stat, subname, err, cause\_c )
1134   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}( subname )
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dccaldateeval_8f90_adfd92e4e46bcfe6c30d007ca03d574c7_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{dccaldateeval_8f90_aa541828da0b449cf8221578254f689c0}\label{dccaldateeval_8f90_aa541828da0b449cf8221578254f689c0}} 
\index{dccaldateeval.\+f90@{dccaldateeval.\+f90}!dccaldateevalymdhms1@{dccaldateevalymdhms1}}
\index{dccaldateevalymdhms1@{dccaldateevalymdhms1}!dccaldateeval.\+f90@{dccaldateeval.\+f90}}
\subsubsection{\texorpdfstring{dccaldateevalymdhms1()}{dccaldateevalymdhms1()}}
{\footnotesize\ttfamily subroutine dccaldateevalymdhms1 (\begin{DoxyParamCaption}\item[{integer, intent(in)}]{year,  }\item[{integer, intent(in)}]{month,  }\item[{integer, intent(in)}]{day,  }\item[{integer, intent(in)}]{hour,  }\item[{integer, intent(in)}]{min,  }\item[{real(dp), intent(in)}]{sec,  }\item[{real(dp), intent(in)}]{elapse\+\_\+sec,  }\item[{type(dc\+\_\+cal), intent(in), optional, target}]{cal,  }\item[{type(dc\+\_\+cal\+\_\+date), intent(out), optional, target}]{date,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 16 of file dccaldateeval.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+error\+::dc\+\_\+ealreadyinit, dc\+\_\+error\+::dc\+\_\+ebaddate, dc\+\_\+error\+::dc\+\_\+einconsistcaldate, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+calendar\+\_\+internal\+::dccaldate\+\_\+normalize(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal, dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal\+\_\+set(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+date, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
16   \textcolor{comment}{!}
17   \textcolor{comment}{! 日時の算出と設定を行います. }
18   \textcolor{comment}{!}
19   \textcolor{comment}{! 省略可能引数 *date* が省略された場合には, dc\_calendar 内部で}
20   \textcolor{comment}{! 保持される "dc\_calendar\_types#DC\_CAL\_DATE" 型の変数に日時が}
21   \textcolor{comment}{! 設定されます. その後の手続きで *date* を省略した場合には}
22   \textcolor{comment}{! この日時が使用されます. }
23   \textcolor{comment}{! *date* が省略されない場合にはその変数に日時が設定されます. }
24   \textcolor{comment}{! その日時を使用する場合, 手続きにその "dc\_calendar\_types#DC\_CAL\_DATE" 型の変数}
25   \textcolor{comment}{! を与えてください. }
26   \textcolor{comment}{!}
27   \textcolor{comment}{! 省略可能引数 *cal* が省略された場合には, 経過秒数 *elapse\_sec* }
28   \textcolor{comment}{! の年月日時分への変換に dc\_calendar 内部で保持される暦が用いられます. }
29   \textcolor{comment}{! *cal* が省略されない場合にはその変数に設定された暦が用いられます. }
30   \textcolor{comment}{!}
31   \textcolor{comment}{! Evaluate and set date. }
32   \textcolor{comment}{!}
33   \textcolor{comment}{! If an optional argument *date* is omitted, }
34   \textcolor{comment}{! the date setting is stored to a "dc\_calendar\_types#DC\_CAL\_DATE" }
35   \textcolor{comment}{! variable that is saved in the "dc\_calendar". }
36   \textcolor{comment}{! When *date* is omitted in subsequent procedures, the internal date}
37   \textcolor{comment}{! is used. }
38   \textcolor{comment}{! If *date* is not omitted, the settings is stored to the *date*. }
39   \textcolor{comment}{! In order to use the date setting, use the "dc\_calendar\_types#DC\_CAL\_DATE" }
40   \textcolor{comment}{! varieble to subsequent procedures. }
41   \textcolor{comment}{!}
42   \textcolor{comment}{! If an optional argument *cal* is omitted, }
43   \textcolor{comment}{! information of calendar that is stored in the "dc\_calendar" }
44   \textcolor{comment}{! is used for conversion of elapsed seconds *elapse\_sec* into }
45   \textcolor{comment}{! year-month-day etc.}
46   \textcolor{comment}{! If *cal* is not omitted, information of the variable is used. }
47   \textcolor{comment}{!}
48 
49   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__types}{dc\_calendar\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}, \hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}
50   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__internal}{dc\_calendar\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}, 
      \hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}, \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}, &
51     & \hyperlink{namespacedc__calendar__internal_a5aaf74615ddc4b9e53d67d4949c55dd5}{dccaldate\_normalize}
52   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__generic}{dc\_calendar\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__calendar__generic_1_1dccaldatecreate}{dccaldatecreate}, 
      \hyperlink{interfacedc__calendar__generic_1_1dccaldatetochar}{dccaldatetochar}, \hyperlink{interfacedc__calendar__generic_1_1dccaltochar}{dccaltochar}
53   \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
54   \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
55   \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}, 
      \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, &
56     & \hyperlink{namespacedc__error_af615e5370c2a4be7e491ababe9171027}{dc\_einconsistcaldate}, \hyperlink{namespacedc__error_a3302263a8c976235052a305d54572070}{dc\_ealreadyinit}, 
      \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
57   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
58   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
59   \textcolor{keywordtype}{implicit none}
60   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: year  \textcolor{comment}{! 起点の年. Year of origin.  }
61   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: month \textcolor{comment}{! 起点の月. Month of origin. }
62   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: day   \textcolor{comment}{! 起点の日. Day of origin.   }
63   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: hour  \textcolor{comment}{! 起点の時. Hour of origin.  }
64   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: min   \textcolor{comment}{! 起点の分. Minute of origin.}
65   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: sec  \textcolor{comment}{! 起点の秒. Second of origin.}
66   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: elapse\_sec
67                               \textcolor{comment}{! *year* 〜 *sec* からの経過秒数. }
68                               \textcolor{comment}{! Elapsed seconds from *year* -- *sec*}
69   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: cal
70                               \textcolor{comment}{! 暦情報を収めたオブジェクト. }
71                               \textcolor{comment}{! }
72                               \textcolor{comment}{! An object that stores information of }
73                               \textcolor{comment}{! calendar. }
74   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: date
75                               \textcolor{comment}{! 経過時間後の日時情報を収めたオブジェクト. }
76                               \textcolor{comment}{! }
77                               \textcolor{comment}{! An object that stores information of }
78                               \textcolor{comment}{! date and time after elapsed time. }
79   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
80                               \textcolor{comment}{! 例外処理用フラグ. }
81                               \textcolor{comment}{! デフォルトでは, この手続き内でエラーが}
82                               \textcolor{comment}{! 生じた場合, プログラムは強制終了します. }
83                               \textcolor{comment}{! 引数 *err* が与えられる場合, }
84                               \textcolor{comment}{! プログラムは強制終了せず, 代わりに}
85                               \textcolor{comment}{! *err* に .true. が代入されます. }
86                               \textcolor{comment}{!}
87                               \textcolor{comment}{! Exception handling flag. }
88                               \textcolor{comment}{! By default, when error occur in }
89                               \textcolor{comment}{! this procedure, the program aborts. }
90                               \textcolor{comment}{! If this *err* argument is given, }
91                               \textcolor{comment}{! .true. is substituted to *err* and }
92                               \textcolor{comment}{! the program does not abort. }
93 
94   \textcolor{comment}{! 作業変数}
95   \textcolor{comment}{! Work variables}
96   \textcolor{comment}{!}
97   \textcolor{keywordtype}{integer}:: wyear, wmonth, wday, whour, wmin
98   \textcolor{keywordtype}{real(DP)}:: wsec
99   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{pointer}:: datep =>null()
100   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{pointer}:: calp =>null()
101   \textcolor{keywordtype}{character(STRING)}:: e\_date\_str, e\_cal\_str
102   \textcolor{keywordtype}{integer}:: stat
103   \textcolor{keywordtype}{character(STRING)}:: cause\_c
104   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCCalDateEvalYMDHMS1'}
105 \textcolor{keywordflow}{continue}
106   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}( subname )
107   stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
108   cause\_c = \textcolor{stringliteral}{''}
109 
110   \textcolor{comment}{! オブジェクトのポインタ割付}
111   \textcolor{comment}{! Associate pointer of an object}
112   \textcolor{comment}{!}
113   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( date ) ) \textcolor{keywordflow}{then}
114     datep => date
115   \textcolor{keywordflow}{else}
116     datep => \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}
117 \textcolor{keywordflow}{  end if}
118 
119   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( cal ) ) \textcolor{keywordflow}{then}
120     calp => cal
121   \textcolor{keywordflow}{else}
122     calp => \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}
123     \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keyword}{call }\hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}
124 \textcolor{keywordflow}{  end if}
125 
126   \textcolor{comment}{! 初期設定のチェック}
127   \textcolor{comment}{! Check initialization}
128   \textcolor{comment}{!}
129 \textcolor{comment}{!!$  if ( .not. datep % initialized ) then}
130 \textcolor{comment}{!!$    stat = DC\_ENOTINIT}
131 \textcolor{comment}{!!$    cause\_c = 'DC\_CAL\_DATE'}
132 \textcolor{comment}{!!$    goto 999}
133 \textcolor{comment}{!!$  end if}
134 
135   \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keywordflow}{then}
136     stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
137     cause\_c = \textcolor{stringliteral}{'DC\_CAL'}
138     \textcolor{keywordflow}{goto} 999
139 \textcolor{keywordflow}{  end if}
140 
141   \textcolor{comment}{! 各要素への値の参照}
142   \textcolor{comment}{! Refer elements}
143   \textcolor{comment}{!}
144   wyear  = year
145   wmonth = month
146   wday   = day
147   whour  = hour
148   wmin   = min
149   wsec   = sec
150 
151   \textcolor{comment}{! 経過時間(秒)の追加}
152   \textcolor{comment}{! Add elapsed time (seconds)}
153   \textcolor{comment}{!}
154 \textcolor{comment}{!!$  if ( elapse\_sec < 0.0\_DP ) then}
155 \textcolor{comment}{!!$    stat = DC\_ENEGATIVE}
156 \textcolor{comment}{!!$    cause\_c = 'elapse\_sec'}
157 \textcolor{comment}{!!$    goto 999}
158 \textcolor{comment}{!!$  end if}
159 
160   wsec = wsec + elapse\_sec
161 
162   \textcolor{comment}{! 日時の正規化}
163   \textcolor{comment}{! Normalize date and time }
164   \textcolor{comment}{!}
165   stat = \hyperlink{namespacedc__calendar__internal_a5aaf74615ddc4b9e53d67d4949c55dd5}{dccaldate\_normalize}( wyear, wmonth, wday, whour, wmin, wsec, & \textcolor{comment}{! (inout)}
166     &                         calp )                                    \textcolor{comment}{! (in)}
167   \textcolor{keywordflow}{if} ( stat == \hyperlink{namespacedc__error_af615e5370c2a4be7e491ababe9171027}{dc\_einconsistcaldate} ) \textcolor{keywordflow}{then}
168     e\_cal\_str = \hyperlink{interfacedc__calendar__generic_1_1dccaltochar}{dccaltochar}( calp )
169     e\_date\_str = \hyperlink{interfacedc__calendar__generic_1_1dccaldatetochar}{dccaldatetochar}( wyear, wmonth, wday, whour, wmin, wsec, zone = \textcolor{stringliteral}{""} )
170     \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'cal=<%c> and date=<%c> are inconsistency'}, &
171       & c1 = trim(e\_cal\_str), c2 = trim(e\_date\_str) )
172     \textcolor{keywordflow}{goto} 999
173 \textcolor{keywordflow}{  end if}
174 
175   \textcolor{comment}{! オブジェクトの作成}
176   \textcolor{comment}{! Create an object}
177   \textcolor{comment}{!}
178   \textcolor{keyword}{call }\hyperlink{interfacedc__calendar__generic_1_1dccaldatecreate}{dccaldatecreate}( &
179     & wyear, wmonth, wday, whour, wmin, wsec, & \textcolor{comment}{! (in)}
180     & datep, zone = \textcolor{stringliteral}{""}, err = err )             \textcolor{comment}{! (out) optional}
181   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(err) ) \textcolor{keywordflow}{then}
182     \textcolor{keywordflow}{if} ( err ) \textcolor{keywordflow}{then}
183       stat = \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}
184       \textcolor{keywordflow}{goto} 999
185 \textcolor{keywordflow}{    end if}
186 \textcolor{keywordflow}{  end if}
187 
188   \textcolor{comment}{! 終了処理, 例外処理}
189   \textcolor{comment}{! Termination and Exception handling}
190   \textcolor{comment}{!}
191 999 \textcolor{keywordflow}{continue}
192   \textcolor{keyword}{nullify}( calp, datep )
193   \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}( stat, subname, err, cause\_c )
194   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}( subname )
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dccaldateeval_8f90_aa541828da0b449cf8221578254f689c0_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{dccaldateeval_8f90_a19df8b0b23beb105affd997b8f14fdc9}\label{dccaldateeval_8f90_a19df8b0b23beb105affd997b8f14fdc9}} 
\index{dccaldateeval.\+f90@{dccaldateeval.\+f90}!dccaldateevalymdhms2@{dccaldateevalymdhms2}}
\index{dccaldateevalymdhms2@{dccaldateevalymdhms2}!dccaldateeval.\+f90@{dccaldateeval.\+f90}}
\subsubsection{\texorpdfstring{dccaldateevalymdhms2()}{dccaldateevalymdhms2()}}
{\footnotesize\ttfamily subroutine dccaldateevalymdhms2 (\begin{DoxyParamCaption}\item[{integer, intent(in)}]{year,  }\item[{integer, intent(in)}]{month,  }\item[{integer, intent(in)}]{day,  }\item[{integer, intent(in)}]{hour,  }\item[{integer, intent(in)}]{min,  }\item[{real(dp), intent(in)}]{sec,  }\item[{real(dp), intent(in)}]{elapse\+\_\+time,  }\item[{character($\ast$), intent(in)}]{units,  }\item[{type(dc\+\_\+cal), intent(in), optional, target}]{cal,  }\item[{type(dc\+\_\+cal\+\_\+date), intent(out), optional, target}]{date,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 201 of file dccaldateeval.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+error\+::dc\+\_\+ealreadyinit, dc\+\_\+error\+::dc\+\_\+ebaddate, dc\+\_\+error\+::dc\+\_\+ebadunit, dc\+\_\+error\+::dc\+\_\+einconsistcaldate, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+calendar\+\_\+internal\+::dccaldate\+\_\+normalize(), dc\+\_\+calendar\+\_\+internal\+::dccaldate\+\_\+str2usym(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal, dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal\+\_\+set(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+date, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+day, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+hour, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+min, and dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+sec.


\begin{DoxyCode}
201   \textcolor{comment}{!}
202   \textcolor{comment}{! 日時の算出と設定を行います. }
203   \textcolor{comment}{!}
204   \textcolor{comment}{! 省略可能引数 *date* が省略された場合には, dc\_calendar 内部で}
205   \textcolor{comment}{! 保持される "dc\_calendar\_types#DC\_CAL\_DATE" 型の変数に日時が}
206   \textcolor{comment}{! 設定されます. その後の手続きで *date* を省略した場合には}
207   \textcolor{comment}{! この日時が使用されます. }
208   \textcolor{comment}{! *date* が省略されない場合にはその変数に日時が設定されます. }
209   \textcolor{comment}{! その日時を使用する場合, 手続きにその "dc\_calendar\_types#DC\_CAL\_DATE" 型の変数}
210   \textcolor{comment}{! を与えてください. }
211   \textcolor{comment}{!}
212   \textcolor{comment}{! 省略可能引数 *cal* が省略された場合には, 経過時間 *elapse\_time* }
213   \textcolor{comment}{! の年月日時分への変換に dc\_calendar 内部で保持される暦が用いられます. }
214   \textcolor{comment}{! *cal* が省略されない場合にはその変数に設定された暦が用いられます. }
215   \textcolor{comment}{!}
216   \textcolor{comment}{! Evaluate and set date. }
217   \textcolor{comment}{!}
218   \textcolor{comment}{! If an optional argument *date* is omitted, }
219   \textcolor{comment}{! the date setting is stored to a "dc\_calendar\_types#DC\_CAL\_DATE" }
220   \textcolor{comment}{! variable that is saved in the "dc\_calendar". }
221   \textcolor{comment}{! When *date* is omitted in subsequent procedures, the internal date}
222   \textcolor{comment}{! is used. }
223   \textcolor{comment}{! If *date* is not omitted, the settings is stored to the *date*. }
224   \textcolor{comment}{! In order to use the date setting, use the "dc\_calendar\_types#DC\_CAL\_DATE" }
225   \textcolor{comment}{! varieble to subsequent procedures. }
226   \textcolor{comment}{!}
227   \textcolor{comment}{! If an optional argument *cal* is omitted, }
228   \textcolor{comment}{! information of calendar that is stored in the "dc\_calendar" }
229   \textcolor{comment}{! is used for conversion of elapsed time *elapse\_time* into }
230   \textcolor{comment}{! year-month-day etc.}
231   \textcolor{comment}{! If *cal* is not omitted, information of the variable is used. }
232   \textcolor{comment}{!}
233 
234   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__types}{dc\_calendar\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}, \hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}, &
235     & \hyperlink{namespacedc__calendar__types_ab4be572292ddec215a2e956866a4d893}{unit\_symbol\_day}, \hyperlink{namespacedc__calendar__types_ab35dfa690b91efaf7cfc2d056da4629b}{unit\_symbol\_hour}, 
      \hyperlink{namespacedc__calendar__types_ac941d6da4d3fd07f09b543d20796e606}{unit\_symbol\_min}, \hyperlink{namespacedc__calendar__types_a15ce2d6947c7143915fa55b6549d4997}{unit\_symbol\_sec}
236   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__internal}{dc\_calendar\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}, 
      \hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}, \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}, &
237     & \hyperlink{namespacedc__calendar__internal_a5aaf74615ddc4b9e53d67d4949c55dd5}{dccaldate\_normalize}, \hyperlink{namespacedc__calendar__internal_ae2ad5ba61c1d074aea90ec876012150c}{dccaldate\_str2usym}
238   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__generic}{dc\_calendar\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__calendar__generic_1_1dccaldatecreate}{dccaldatecreate}, 
      \hyperlink{interfacedc__calendar__generic_1_1dccaldatetochar}{dccaldatetochar}, \hyperlink{interfacedc__calendar__generic_1_1dccaltochar}{dccaltochar}
239   \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
240   \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
241   \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}, 
      \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, &
242     & \hyperlink{namespacedc__error_af615e5370c2a4be7e491ababe9171027}{dc\_einconsistcaldate}, \hyperlink{namespacedc__error_a3302263a8c976235052a305d54572070}{dc\_ealreadyinit}, 
      \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}, \hyperlink{namespacedc__error_a19b63488d4f7bc5507179bb795640f5f}{dc\_ebadunit}, &
243     & \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
244   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
245   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
246   \textcolor{keywordtype}{implicit none}
247   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: year  \textcolor{comment}{! 起点の年. Year of origin.  }
248   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: month \textcolor{comment}{! 起点の月. Month of origin. }
249   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: day   \textcolor{comment}{! 起点の日. Day of origin.   }
250   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: hour  \textcolor{comment}{! 起点の時. Hour of origin.  }
251   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: min   \textcolor{comment}{! 起点の分. Minute of origin.}
252   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: sec  \textcolor{comment}{! 起点の秒. Second of origin.}
253   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: elapse\_time
254                               \textcolor{comment}{! *year* 〜 *sec* からの経過時間. }
255                               \textcolor{comment}{! 単位は *unit* で指定する. }
256                               \textcolor{comment}{!}
257                               \textcolor{comment}{! Elapsed time from *year* -- *sec*}
258                               \textcolor{comment}{! Unit is specified as *unit*.}
259   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: units
260                               \textcolor{comment}{! *elapse\_time* の単位. }
261                               \textcolor{comment}{!}
262                               \textcolor{comment}{! Unit of *elapse\_time*. }
263   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: cal
264                               \textcolor{comment}{! 暦情報を収めたオブジェクト. }
265                               \textcolor{comment}{! }
266                               \textcolor{comment}{! An object that stores information of }
267                               \textcolor{comment}{! calendar. }
268   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: date
269                               \textcolor{comment}{! 経過時間後の日時情報を収めたオブジェクト. }
270                               \textcolor{comment}{! }
271                               \textcolor{comment}{! An object that stores information of }
272                               \textcolor{comment}{! date and time after elapsed time. }
273   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
274                               \textcolor{comment}{! 例外処理用フラグ. }
275                               \textcolor{comment}{! デフォルトでは, この手続き内でエラーが}
276                               \textcolor{comment}{! 生じた場合, プログラムは強制終了します. }
277                               \textcolor{comment}{! 引数 *err* が与えられる場合, }
278                               \textcolor{comment}{! プログラムは強制終了せず, 代わりに}
279                               \textcolor{comment}{! *err* に .true. が代入されます. }
280                               \textcolor{comment}{!}
281                               \textcolor{comment}{! Exception handling flag. }
282                               \textcolor{comment}{! By default, when error occur in }
283                               \textcolor{comment}{! this procedure, the program aborts. }
284                               \textcolor{comment}{! If this *err* argument is given, }
285                               \textcolor{comment}{! .true. is substituted to *err* and }
286                               \textcolor{comment}{! the program does not abort. }
287 
288   \textcolor{comment}{! 作業変数}
289   \textcolor{comment}{! Work variables}
290   \textcolor{comment}{!}
291   \textcolor{keywordtype}{integer}:: wyear, wmonth, wday, whour, wmin
292   \textcolor{keywordtype}{real(DP)}:: wsec
293   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{pointer}:: datep =>null()
294   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{pointer}:: calp =>null()
295   \textcolor{keywordtype}{character(STRING)}:: e\_date\_str, e\_cal\_str
296   \textcolor{keywordtype}{integer}:: tusym
297   \textcolor{keywordtype}{integer}:: stat
298   \textcolor{keywordtype}{character(STRING)}:: cause\_c
299   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCCalDateEvalYMDHMS2'}
300 \textcolor{keywordflow}{continue}
301   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}( subname )
302   stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
303   cause\_c = \textcolor{stringliteral}{''}
304 
305   \textcolor{comment}{! オブジェクトのポインタ割付}
306   \textcolor{comment}{! Associate pointer of an object}
307   \textcolor{comment}{!}
308   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( date ) ) \textcolor{keywordflow}{then}
309     datep => date
310   \textcolor{keywordflow}{else}
311     datep => \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}
312 \textcolor{keywordflow}{  end if}
313 
314   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( cal ) ) \textcolor{keywordflow}{then}
315     calp => cal
316   \textcolor{keywordflow}{else}
317     calp => \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}
318     \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keyword}{call }\hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}
319 \textcolor{keywordflow}{  end if}
320 
321   \textcolor{comment}{! 初期設定のチェック}
322   \textcolor{comment}{! Check initialization}
323   \textcolor{comment}{!}
324 \textcolor{comment}{!!$  if ( .not. datep % initialized ) then}
325 \textcolor{comment}{!!$    stat = DC\_ENOTINIT}
326 \textcolor{comment}{!!$    cause\_c = 'DC\_CAL\_DATE'}
327 \textcolor{comment}{!!$    goto 999}
328 \textcolor{comment}{!!$  end if}
329 
330   \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keywordflow}{then}
331     stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
332     cause\_c = \textcolor{stringliteral}{'DC\_CAL'}
333     \textcolor{keywordflow}{goto} 999
334 \textcolor{keywordflow}{  end if}
335 
336   \textcolor{comment}{! 各要素への値の参照}
337   \textcolor{comment}{! Refer elements}
338   \textcolor{comment}{!}
339   wyear  = year
340   wmonth = month
341   wday   = day
342   whour  = hour
343   wmin   = min
344   wsec   = sec
345 
346   \textcolor{comment}{! 経過時間(秒)の追加}
347   \textcolor{comment}{! Add elapsed time (seconds)}
348   \textcolor{comment}{!}
349 \textcolor{comment}{!!$  if ( elapse\_time < 0.0\_DP ) then}
350 \textcolor{comment}{!!$    stat = DC\_ENEGATIVE}
351 \textcolor{comment}{!!$    cause\_c = 'elapse\_time'}
352 \textcolor{comment}{!!$    goto 999}
353 \textcolor{comment}{!!$  end if}
354 
355   tusym = \hyperlink{namespacedc__calendar__internal_ae2ad5ba61c1d074aea90ec876012150c}{dccaldate\_str2usym}(units)
356   \textcolor{keywordflow}{select case}(tusym)
357   \textcolor{keywordflow}{case}(\hyperlink{namespacedc__calendar__types_ab4be572292ddec215a2e956866a4d893}{unit\_symbol\_day})
358     wsec = wsec + elapse\_time * calp % hour\_in\_day &
359       &                       * calp % min\_in\_hour &
360       &                       * calp % sec\_in\_min
361   \textcolor{keywordflow}{case}(\hyperlink{namespacedc__calendar__types_ab35dfa690b91efaf7cfc2d056da4629b}{unit\_symbol\_hour})
362     wsec = wsec + elapse\_time * calp % min\_in\_hour &
363       &                       * calp % sec\_in\_min
364   \textcolor{keywordflow}{case}(\hyperlink{namespacedc__calendar__types_ac941d6da4d3fd07f09b543d20796e606}{unit\_symbol\_min})
365     wsec = wsec + elapse\_time * calp % sec\_in\_min
366   \textcolor{keywordflow}{case}(\hyperlink{namespacedc__calendar__types_a15ce2d6947c7143915fa55b6549d4997}{unit\_symbol\_sec})
367     wsec = wsec + elapse\_time
368 \textcolor{keywordflow}{  case default}
369     cause\_c = units
370     \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'units=<%c> is invalid. (ONLY day,hrs,min,sec are valid)'}
      , &
371       & c1 = trim(units) )
372     stat = \hyperlink{namespacedc__error_a19b63488d4f7bc5507179bb795640f5f}{dc\_ebadunit}
373     \textcolor{keywordflow}{goto} 999
374 \textcolor{keywordflow}{  end select}
375 
376   \textcolor{comment}{! 日時の正規化}
377   \textcolor{comment}{! Normalize date and time }
378   \textcolor{comment}{!}
379   stat = \hyperlink{namespacedc__calendar__internal_a5aaf74615ddc4b9e53d67d4949c55dd5}{dccaldate\_normalize}( wyear, wmonth, wday, whour, wmin, wsec, & \textcolor{comment}{! (inout)}
380     &                         calp )                                    \textcolor{comment}{! (in)}
381   \textcolor{keywordflow}{if} ( stat == \hyperlink{namespacedc__error_af615e5370c2a4be7e491ababe9171027}{dc\_einconsistcaldate} ) \textcolor{keywordflow}{then}
382     e\_cal\_str = \hyperlink{interfacedc__calendar__generic_1_1dccaltochar}{dccaltochar}( calp )
383     e\_date\_str = \hyperlink{interfacedc__calendar__generic_1_1dccaldatetochar}{dccaldatetochar}( wyear, wmonth, wday, whour, wmin, wsec, zone = \textcolor{stringliteral}{""} )
384     \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'cal=<%c> and date=<%c> are inconsistency'}, &
385       & c1 = trim(e\_cal\_str), c2 = trim(e\_date\_str) )
386     \textcolor{keywordflow}{goto} 999
387 \textcolor{keywordflow}{  end if}
388 
389   \textcolor{comment}{! オブジェクトの作成}
390   \textcolor{comment}{! Create an object}
391   \textcolor{comment}{!}
392   \textcolor{keyword}{call }\hyperlink{interfacedc__calendar__generic_1_1dccaldatecreate}{dccaldatecreate}( &
393     & wyear, wmonth, wday, whour, wmin, wsec, & \textcolor{comment}{! (in)}
394     & datep, zone = \textcolor{stringliteral}{""}, err = err )             \textcolor{comment}{! (out) optional}
395   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(err) ) \textcolor{keywordflow}{then}
396     \textcolor{keywordflow}{if} ( err ) \textcolor{keywordflow}{then}
397       stat = \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}
398       \textcolor{keywordflow}{goto} 999
399 \textcolor{keywordflow}{    end if}
400 \textcolor{keywordflow}{  end if}
401 
402   \textcolor{comment}{! 終了処理, 例外処理}
403   \textcolor{comment}{! Termination and Exception handling}
404   \textcolor{comment}{!}
405 999 \textcolor{keywordflow}{continue}
406   \textcolor{keyword}{nullify}( calp, datep )
407   \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}( stat, subname, err, cause\_c )
408   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}( subname )
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dccaldateeval_8f90_a19df8b0b23beb105affd997b8f14fdc9_cgraph}
\end{center}
\end{figure}
