\hypertarget{dcdatetimeparseunits_8f90}{}\section{dc\+\_\+utils/dcdatetimeparseunits.f90 File Reference}
\label{dcdatetimeparseunits_8f90}\index{dc\+\_\+utils/dcdatetimeparseunits.\+f90@{dc\+\_\+utils/dcdatetimeparseunits.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
integer function \hyperlink{dcdatetimeparseunits_8f90_a5f0d47be558f74f84e0e728f9f703fbe}{dcdatetimeparseunits} (str)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{dcdatetimeparseunits_8f90_a5f0d47be558f74f84e0e728f9f703fbe}\label{dcdatetimeparseunits_8f90_a5f0d47be558f74f84e0e728f9f703fbe}} 
\index{dcdatetimeparseunits.\+f90@{dcdatetimeparseunits.\+f90}!dcdatetimeparseunits@{dcdatetimeparseunits}}
\index{dcdatetimeparseunits@{dcdatetimeparseunits}!dcdatetimeparseunits.\+f90@{dcdatetimeparseunits.\+f90}}
\subsubsection{\texorpdfstring{dcdatetimeparseunits()}{dcdatetimeparseunits()}}
{\footnotesize\ttfamily integer function dcdatetimeparseunits (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{str }\end{DoxyParamCaption})}



Definition at line 11 of file dcdatetimeparseunits.\+f90.



References dc\+\_\+types\+::token, dc\+\_\+date\+\_\+types\+::unit\+\_\+day, dc\+\_\+date\+\_\+types\+::unit\+\_\+hour, dc\+\_\+date\+\_\+types\+::unit\+\_\+min, dc\+\_\+date\+\_\+types\+::unit\+\_\+month, dc\+\_\+date\+\_\+types\+::unit\+\_\+nondim, dc\+\_\+date\+\_\+types\+::unit\+\_\+sec, dc\+\_\+date\+\_\+types\+::unit\+\_\+symbol\+\_\+day, dc\+\_\+date\+\_\+types\+::unit\+\_\+symbol\+\_\+err, dc\+\_\+date\+\_\+types\+::unit\+\_\+symbol\+\_\+hour, dc\+\_\+date\+\_\+types\+::unit\+\_\+symbol\+\_\+min, dc\+\_\+date\+\_\+types\+::unit\+\_\+symbol\+\_\+month, dc\+\_\+date\+\_\+types\+::unit\+\_\+symbol\+\_\+nondim, dc\+\_\+date\+\_\+types\+::unit\+\_\+symbol\+\_\+sec, dc\+\_\+date\+\_\+types\+::unit\+\_\+symbol\+\_\+year, and dc\+\_\+date\+\_\+types\+::unit\+\_\+year.


\begin{DoxyCode}
11     \textcolor{comment}{!}
12     \textcolor{comment}{! 引数 *str* に与えられた文字列を解釈し, 日時の単位を示す}
13     \textcolor{comment}{! シンボルを返します. それぞれ以下の文字列が日時の単位として解釈されます.}
14     \textcolor{comment}{! 大文字と小文字は区別されません.}
15     \textcolor{comment}{!}
16     \textcolor{comment}{! 年         :: dc\_date\_types#UNIT\_YEAR}
17     \textcolor{comment}{! 月         :: dc\_date\_types#UNIT\_MONTH}
18     \textcolor{comment}{! 日         :: dc\_date\_types#UNIT\_DAY}
19     \textcolor{comment}{! 時         :: dc\_date\_types#UNIT\_HOUR}
20     \textcolor{comment}{! 分         :: dc\_date\_types#UNIT\_MIN}
21     \textcolor{comment}{! 秒         :: dc\_date\_types#UNIT\_SEC}
22     \textcolor{comment}{! 無次元時間 :: dc\_date\_types#UNIT\_NONDIM}
23     \textcolor{comment}{!}
24     \textcolor{comment}{! 返るシンボル (整数型) は以下の通りです. }
25     \textcolor{comment}{!}
26     \textcolor{comment}{! 年         :: dc\_date\_types#UNIT\_SYMBOL\_YEAR}
27     \textcolor{comment}{! 月         :: dc\_date\_types#UNIT\_SYMBOL\_MONTH}
28     \textcolor{comment}{! 日         :: dc\_date\_types#UNIT\_SYMBOL\_DAY}
29     \textcolor{comment}{! 時         :: dc\_date\_types#UNIT\_SYMBOL\_HOUR}
30     \textcolor{comment}{! 分         :: dc\_date\_types#UNIT\_SYMBOL\_MIN}
31     \textcolor{comment}{! 秒         :: dc\_date\_types#UNIT\_SYMBOL\_SEC}
32     \textcolor{comment}{! 無次元時間 :: dc\_date\_types#UNIT\_SYMBOL\_NONDIM}
33     \textcolor{comment}{!}
34     \textcolor{comment}{! これらに該当しない文字列を *str* に与えた場合, }
35     \textcolor{comment}{! dc\_date\_types#UNIT\_SYMBOL\_ERR が返ります. }
36     \textcolor{comment}{!}
37     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
38     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__date__types_aee434347343763e4315c88517a09dd17}{unit\_year}, \hyperlink{namespacedc__date__types_a0171673ef9705dc97fd12e5bffdf0810}{unit\_month}, 
      \hyperlink{namespacedc__date__types_a6da8cbb0bc9447d97e79e735460cc4ef}{unit\_day}, &
39       & \hyperlink{namespacedc__date__types_ac98b784dce5552f0b58038abbde0aab8}{unit\_hour}, \hyperlink{namespacedc__date__types_afb17aa2ee3d49744a510337afe27facf}{unit\_min}, \hyperlink{namespacedc__date__types_ac452eae56edaf57fe765430ef848a788}{unit\_sec}, \hyperlink{namespacedc__date__types_a3509f6cb130eb760ec4a1fc94dc7d3fe}{unit\_nondim}, &
40       & \hyperlink{namespacedc__date__types_af2214286fd54dcc9bc46201851b71794}{unit\_symbol\_year}, \hyperlink{namespacedc__date__types_a2854b3d01fa0384ce83a7eb5a46c0b63}{unit\_symbol\_month}, 
      \hyperlink{namespacedc__date__types_adc87b2279e8fefa8078ad877ad14194e}{unit\_symbol\_day}, &
41       & \hyperlink{namespacedc__date__types_a10df725fcb094ad0a2f868a93b6ce34c}{unit\_symbol\_hour}, \hyperlink{namespacedc__date__types_a129f0ebca6e22dfe96af2934e39eaae3}{unit\_symbol\_min}, 
      \hyperlink{namespacedc__date__types_a5dbd685bd8334def6bf91a9f86e6a2a3}{unit\_symbol\_sec}, &
42       & \hyperlink{namespacedc__date__types_a641f4a9cbf26e15fc8e026c9bdea5222}{unit\_symbol\_nondim}, \hyperlink{namespacedc__date__types_a079bd1036fe904752c0423b145cdff22}{unit\_symbol\_err}
43     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1strieq}{strieq}
44     \textcolor{keywordtype}{implicit none}
45     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: str
46     \textcolor{keywordtype}{integer}:: symbol
47     \textcolor{keywordtype}{integer}:: unit\_str\_size, i
48     \textcolor{keywordtype}{character(TOKEN)}:: unit
49   \textcolor{keywordflow}{continue}
50     unit = adjustl(str)
51     unit\_str\_size = \textcolor{keyword}{size}(\hyperlink{namespacedc__date__types_a3509f6cb130eb760ec4a1fc94dc7d3fe}{unit\_nondim})
52     \textcolor{keywordflow}{do} i = 1, unit\_str\_size
53       \textcolor{keywordflow}{if} (\hyperlink{interfacedc__string_1_1strieq}{strieq}(trim(unit), trim(\hyperlink{namespacedc__date__types_a3509f6cb130eb760ec4a1fc94dc7d3fe}{unit\_nondim}(i)))) \textcolor{keywordflow}{then}
54         symbol = \hyperlink{namespacedc__date__types_a641f4a9cbf26e15fc8e026c9bdea5222}{unit\_symbol\_nondim}
55         \textcolor{keywordflow}{return}
56 \textcolor{keywordflow}{      end if}
57 \textcolor{keywordflow}{    end do}
58 
59     unit\_str\_size = \textcolor{keyword}{size}(\hyperlink{namespacedc__date__types_ac452eae56edaf57fe765430ef848a788}{unit\_sec})
60     \textcolor{keywordflow}{do} i = 1, unit\_str\_size
61       \textcolor{keywordflow}{if} (\hyperlink{interfacedc__string_1_1strieq}{strieq}(trim(unit), trim(\hyperlink{namespacedc__date__types_ac452eae56edaf57fe765430ef848a788}{unit\_sec}(i)))) \textcolor{keywordflow}{then}
62         symbol = \hyperlink{namespacedc__date__types_a5dbd685bd8334def6bf91a9f86e6a2a3}{unit\_symbol\_sec}
63         \textcolor{keywordflow}{return}
64 \textcolor{keywordflow}{      end if}
65 \textcolor{keywordflow}{    end do}
66 
67     unit\_str\_size = \textcolor{keyword}{size}(\hyperlink{namespacedc__date__types_afb17aa2ee3d49744a510337afe27facf}{unit\_min})
68     \textcolor{keywordflow}{do} i = 1, unit\_str\_size
69       \textcolor{keywordflow}{if} (\hyperlink{interfacedc__string_1_1strieq}{strieq}(trim(unit), trim(\hyperlink{namespacedc__date__types_afb17aa2ee3d49744a510337afe27facf}{unit\_min}(i)))) \textcolor{keywordflow}{then}
70         symbol = \hyperlink{namespacedc__date__types_a129f0ebca6e22dfe96af2934e39eaae3}{unit\_symbol\_min}
71         \textcolor{keywordflow}{return}
72 \textcolor{keywordflow}{      end if}
73 \textcolor{keywordflow}{    end do}
74 
75     unit\_str\_size = \textcolor{keyword}{size}(\hyperlink{namespacedc__date__types_ac98b784dce5552f0b58038abbde0aab8}{unit\_hour})
76     \textcolor{keywordflow}{do} i = 1, unit\_str\_size
77       \textcolor{keywordflow}{if} (\hyperlink{interfacedc__string_1_1strieq}{strieq}(trim(unit), trim(\hyperlink{namespacedc__date__types_ac98b784dce5552f0b58038abbde0aab8}{unit\_hour}(i)))) \textcolor{keywordflow}{then}
78         symbol = \hyperlink{namespacedc__date__types_a10df725fcb094ad0a2f868a93b6ce34c}{unit\_symbol\_hour}
79         \textcolor{keywordflow}{return}
80 \textcolor{keywordflow}{      end if}
81 \textcolor{keywordflow}{    end do}
82 
83     unit\_str\_size = \textcolor{keyword}{size}(\hyperlink{namespacedc__date__types_a6da8cbb0bc9447d97e79e735460cc4ef}{unit\_day})
84     \textcolor{keywordflow}{do} i = 1, unit\_str\_size
85       \textcolor{keywordflow}{if} (\hyperlink{interfacedc__string_1_1strieq}{strieq}(trim(unit), trim(\hyperlink{namespacedc__date__types_a6da8cbb0bc9447d97e79e735460cc4ef}{unit\_day}(i)))) \textcolor{keywordflow}{then}
86         symbol = \hyperlink{namespacedc__date__types_adc87b2279e8fefa8078ad877ad14194e}{unit\_symbol\_day}
87         \textcolor{keywordflow}{return}
88 \textcolor{keywordflow}{      end if}
89 \textcolor{keywordflow}{    end do}
90 
91     unit\_str\_size = \textcolor{keyword}{size}(\hyperlink{namespacedc__date__types_a0171673ef9705dc97fd12e5bffdf0810}{unit\_month})
92     \textcolor{keywordflow}{do} i = 1, unit\_str\_size
93       \textcolor{keywordflow}{if} (\hyperlink{interfacedc__string_1_1strieq}{strieq}(trim(unit), trim(\hyperlink{namespacedc__date__types_a0171673ef9705dc97fd12e5bffdf0810}{unit\_month}(i)))) \textcolor{keywordflow}{then}
94         symbol = \hyperlink{namespacedc__date__types_a2854b3d01fa0384ce83a7eb5a46c0b63}{unit\_symbol\_month}
95         \textcolor{keywordflow}{return}
96 \textcolor{keywordflow}{      end if}
97 \textcolor{keywordflow}{    end do}
98 
99     unit\_str\_size = \textcolor{keyword}{size}(\hyperlink{namespacedc__date__types_aee434347343763e4315c88517a09dd17}{unit\_year})
100     \textcolor{keywordflow}{do} i = 1, unit\_str\_size
101       \textcolor{keywordflow}{if} (\hyperlink{interfacedc__string_1_1strieq}{strieq}(trim(unit), trim(\hyperlink{namespacedc__date__types_aee434347343763e4315c88517a09dd17}{unit\_year}(i)))) \textcolor{keywordflow}{then}
102         symbol = \hyperlink{namespacedc__date__types_af2214286fd54dcc9bc46201851b71794}{unit\_symbol\_year}
103         \textcolor{keywordflow}{return}
104 \textcolor{keywordflow}{      end if}
105 \textcolor{keywordflow}{    end do}
106 
107     symbol = \hyperlink{namespacedc__date__types_a079bd1036fe904752c0423b145cdff22}{unit\_symbol\_err}
108 
\end{DoxyCode}
