\hypertarget{dccaldatecurrent_8f90}{}\section{dc\+\_\+utils/dccaldatecurrent.f90 File Reference}
\label{dccaldatecurrent_8f90}\index{dc\+\_\+utils/dccaldatecurrent.\+f90@{dc\+\_\+utils/dccaldatecurrent.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{dccaldatecurrent_8f90_a3aba16ae60930b67c0b4176b214f38f2}{dccaldatecurrent1} (date, err)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{dccaldatecurrent_8f90_a3aba16ae60930b67c0b4176b214f38f2}\label{dccaldatecurrent_8f90_a3aba16ae60930b67c0b4176b214f38f2}} 
\index{dccaldatecurrent.\+f90@{dccaldatecurrent.\+f90}!dccaldatecurrent1@{dccaldatecurrent1}}
\index{dccaldatecurrent1@{dccaldatecurrent1}!dccaldatecurrent.\+f90@{dccaldatecurrent.\+f90}}
\subsubsection{\texorpdfstring{dccaldatecurrent1()}{dccaldatecurrent1()}}
{\footnotesize\ttfamily subroutine dccaldatecurrent1 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+cal\+\_\+date), intent(out)}]{date,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 2 of file dccaldatecurrent.\+f90.



References dc\+\_\+error\+::dc\+\_\+ealreadyinit, dc\+\_\+error\+::dc\+\_\+ebaddate, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+calendar\+\_\+internal\+::default\+\_\+date, dc\+\_\+types\+::dp, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
2   \textcolor{comment}{!}
3   \textcolor{comment}{! 実時間を dc\_calendar\_types#DC\_CAL\_DATE 型の}
4   \textcolor{comment}{! date に返します. }
5   \textcolor{comment}{! 実時間は Fortran 90 以降の組み込みサブルーチンである }
6   \textcolor{comment}{! date\_and\_time から得られます. }
7   \textcolor{comment}{!}
8   \textcolor{comment}{! Return actual time +date+ (type "dc\_calendar\_types#DC\_CAL\_DATE"). }
9   \textcolor{comment}{! The actual time is acquired by "date\_and\_time" that is }
10   \textcolor{comment}{! a built-in subroutine of Fortran 90 or more. }
11   \textcolor{comment}{!}
12   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__generic}{dc\_calendar\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__calendar__generic_1_1dccaldateparsestr}{dccaldateparsestr}, 
      \hyperlink{interfacedc__calendar__generic_1_1dccaldatecreate}{dccaldatecreate}
13   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__types}{dc\_calendar\_types}\textcolor{keywordtype}{, only}: dc\_cal\_date
14   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__internal}{dc\_calendar\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}
15   \textcolor{keywordtype}{use }dc\_message\textcolor{keywordtype}{, only}: messagenotify
16   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
17   \textcolor{keywordtype}{use }dc\_trace\textcolor{keywordtype}{, only}: beginsub, endsub
18   \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_a3302263a8c976235052a305d54572070}{dc\_ealreadyinit}, \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}
19   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
20   \textcolor{keywordtype}{implicit none}
21   \textcolor{keywordtype}{type}(dc\_cal\_date), \textcolor{keywordtype}{intent(out)}:: date
22                               \textcolor{comment}{! 実時間の日時情報を収めたオブジェクト. }
23                               \textcolor{comment}{! }
24                               \textcolor{comment}{! An object that stores information of }
25                               \textcolor{comment}{! date and time of actual time. }
26   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
27                               \textcolor{comment}{! 例外処理用フラグ. }
28                               \textcolor{comment}{! デフォルトでは, この手続き内でエラーが}
29                               \textcolor{comment}{! 生じた場合, プログラムは強制終了します. }
30                               \textcolor{comment}{! 引数 *err* が与えられる場合, }
31                               \textcolor{comment}{! プログラムは強制終了せず, 代わりに}
32                               \textcolor{comment}{! *err* に .true. が代入されます. }
33                               \textcolor{comment}{!}
34                               \textcolor{comment}{! Exception handling flag. }
35                               \textcolor{comment}{! By default, when error occur in }
36                               \textcolor{comment}{! this procedure, the program aborts. }
37                               \textcolor{comment}{! If this *err* argument is given, }
38                               \textcolor{comment}{! .true. is substituted to *err* and }
39                               \textcolor{comment}{! the program does not abort. }
40 
41 
42   \textcolor{comment}{! 作業変数}
43   \textcolor{comment}{! Work variables}
44   \textcolor{comment}{!}
45   \textcolor{keywordtype}{integer} :: date\_time\_values(1:8)
46   \textcolor{keywordtype}{character(5)}  :: zone\_raw
47 
48   \textcolor{keywordtype}{integer}:: year  \textcolor{comment}{! 年. Year.}
49   \textcolor{keywordtype}{integer}:: month \textcolor{comment}{! 月. Month.}
50   \textcolor{keywordtype}{integer}:: day   \textcolor{comment}{! 日. Day.}
51   \textcolor{keywordtype}{integer}:: hour  \textcolor{comment}{! 時. Hour.}
52   \textcolor{keywordtype}{integer}:: min   \textcolor{comment}{! 分. Minute.}
53   \textcolor{keywordtype}{real(DP)}:: sec  \textcolor{comment}{! 秒. Second.}
54   \textcolor{keywordtype}{character(TOKEN)}:: zone
55                   \textcolor{comment}{! UTC からの時差. Time-zone.}
56   \textcolor{keywordtype}{integer}:: stat
57   \textcolor{keywordtype}{character(STRING)}:: cause\_c
58   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCCalDateCurrent1'}
59 \textcolor{keywordflow}{continue}
60   \textcolor{keyword}{call }beginsub( subname )
61   stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
62   cause\_c = \textcolor{stringliteral}{''}
63 
64 \textcolor{comment}{!!$  ! 初期設定のチェック}
65 \textcolor{comment}{!!$  ! Check initialization}
66 \textcolor{comment}{!!$  !}
67 \textcolor{comment}{!!$  if ( datep % initialized ) then}
68 \textcolor{comment}{!!$    stat = DC\_EALREADYINIT}
69 \textcolor{comment}{!!$    cause\_c = 'DC\_CAL\_DATE'}
70 \textcolor{comment}{!!$    goto 999}
71 \textcolor{comment}{!!$  end if}
72 
73 
74   \textcolor{comment}{! date\_and\_time 組み込みサブルーチンを用いて, 現在}
75   \textcolor{comment}{! 時刻と UTC からの時差を取得. }
76   \textcolor{comment}{!}
77   \textcolor{keyword}{call }date\_and\_time(zone=zone\_raw, values=date\_time\_values)
78   zone = zone\_raw(1:3) // \textcolor{stringliteral}{":"} // zone\_raw(4:5)
79 
80 
81   \textcolor{comment}{! オブジェクトの作成}
82   \textcolor{comment}{! Create an object}
83   \textcolor{comment}{!}
84   \textcolor{keyword}{call }\hyperlink{interfacedc__calendar__generic_1_1dccaldatecreate}{dccaldatecreate}( &
85     & date\_time\_values(1), date\_time\_values(2), date\_time\_values(3), & \textcolor{comment}{! (in)}
86     & date\_time\_values(5), date\_time\_values(6), &                      \textcolor{comment}{! (in)}
87     & \textcolor{keywordtype}{real( date\_time\_values(7), DP )}, & \textcolor{comment}{! (in)}
88     & date, zone, err = err )            \textcolor{comment}{! (out) optional}
89   if ( present(err) ) then
90     \textcolor{keywordflow}{if} ( err ) \textcolor{keywordflow}{then}
91       stat = \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}
92       \textcolor{keywordflow}{goto} 999
93 \textcolor{keywordflow}{    end if}
94 \textcolor{keywordflow}{  end if}
95 
96   \textcolor{comment}{! 終了処理, 例外処理}
97   \textcolor{comment}{! Termination and Exception handling}
98   \textcolor{comment}{!}
99 999 \textcolor{keywordflow}{continue}
100   \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}( stat, subname, err, cause\_c )
101   \textcolor{keyword}{call }endsub( subname )
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dccaldatecurrent_8f90_a3aba16ae60930b67c0b4176b214f38f2_cgraph}
\end{center}
\end{figure}
