\hypertarget{dcdatetimesub_8f90}{}\section{dc\+\_\+utils/dcdatetimesub.f90 File Reference}
\label{dcdatetimesub_8f90}\index{dc\+\_\+utils/dcdatetimesub.\+f90@{dc\+\_\+utils/dcdatetimesub.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
type(dc\+\_\+datetime) function \hyperlink{dcdatetimesub_8f90_a3fca3a83ac3c7792b1b95ac2e0f91330}{dcdatetime\+\_\+sub\+\_\+tf} (time, diff)
\item 
type(dc\+\_\+difftime) function \hyperlink{dcdatetimesub_8f90_affc22ca7df8916760d0a57f1b436b9ef}{dcdatetime\+\_\+sub\+\_\+tt} (time1, time2)
\item 
type(dc\+\_\+difftime) function \hyperlink{dcdatetimesub_8f90_a85b2f826452cc9ba7c5d1186e385fbc0}{dcdatetime\+\_\+sub\+\_\+ff} (diff1, diff2)
\item 
type(dc\+\_\+difftime) function \hyperlink{dcdatetimesub_8f90_a07a291d529dd0fe71bbdcda454eb3761}{dcdatetime\+\_\+sub\+\_\+fd} (diff, sec)
\item 
type(dc\+\_\+difftime) function \hyperlink{dcdatetimesub_8f90_aa33957fc7818948472b72080fc9f5c24}{dcdatetime\+\_\+sub\+\_\+fr} (diff, sec)
\item 
type(dc\+\_\+difftime) function \hyperlink{dcdatetimesub_8f90_a907ed72bd1e0b9d787ddb1a052697a80}{dcdatetime\+\_\+sub\+\_\+fi} (diff, sec)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{dcdatetimesub_8f90_a07a291d529dd0fe71bbdcda454eb3761}\label{dcdatetimesub_8f90_a07a291d529dd0fe71bbdcda454eb3761}} 
\index{dcdatetimesub.\+f90@{dcdatetimesub.\+f90}!dcdatetime\+\_\+sub\+\_\+fd@{dcdatetime\+\_\+sub\+\_\+fd}}
\index{dcdatetime\+\_\+sub\+\_\+fd@{dcdatetime\+\_\+sub\+\_\+fd}!dcdatetimesub.\+f90@{dcdatetimesub.\+f90}}
\subsubsection{\texorpdfstring{dcdatetime\+\_\+sub\+\_\+fd()}{dcdatetime\_sub\_fd()}}
{\footnotesize\ttfamily type(dc\+\_\+difftime) function dcdatetime\+\_\+sub\+\_\+fd (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{diff,  }\item[{real(dp), intent(in)}]{sec }\end{DoxyParamCaption})}



Definition at line 76 of file dcdatetimesub.\+f90.



References dc\+\_\+date\+\_\+internal\+::dcdate\+\_\+normalize(), and dc\+\_\+types\+::dp.


\begin{DoxyCode}
76     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__internal}{dc\_date\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__date__internal_ac3f0935623089b447b453928ff99b788}{dcdate\_normalize}
77     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}, \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}
78     \textcolor{keywordtype}{use }\hyperlink{namespacedc__scaledsec}{dc\_scaledsec}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-)
79     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
80     \textcolor{keywordtype}{implicit none}
81     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}):: result
82     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: diff
83     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: sec
84   \textcolor{keywordflow}{continue}
85     result % mon = diff % mon
86     result % day = diff % day
87     result % sec = diff % sec - sec
88     result % day\_seconds = diff % day\_seconds
89     \textcolor{keyword}{call }\hyperlink{namespacedc__date__internal_ac3f0935623089b447b453928ff99b788}{dcdate\_normalize}(result % day, result % sec, result % day\_seconds, result %
       nondim\_flag)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dcdatetimesub_8f90_a07a291d529dd0fe71bbdcda454eb3761_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{dcdatetimesub_8f90_a85b2f826452cc9ba7c5d1186e385fbc0}\label{dcdatetimesub_8f90_a85b2f826452cc9ba7c5d1186e385fbc0}} 
\index{dcdatetimesub.\+f90@{dcdatetimesub.\+f90}!dcdatetime\+\_\+sub\+\_\+ff@{dcdatetime\+\_\+sub\+\_\+ff}}
\index{dcdatetime\+\_\+sub\+\_\+ff@{dcdatetime\+\_\+sub\+\_\+ff}!dcdatetimesub.\+f90@{dcdatetimesub.\+f90}}
\subsubsection{\texorpdfstring{dcdatetime\+\_\+sub\+\_\+ff()}{dcdatetime\_sub\_ff()}}
{\footnotesize\ttfamily type(dc\+\_\+difftime) function dcdatetime\+\_\+sub\+\_\+ff (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{diff1,  }\item[{type(dc\+\_\+difftime), intent(in)}]{diff2 }\end{DoxyParamCaption})}



Definition at line 60 of file dcdatetimesub.\+f90.



References dc\+\_\+date\+\_\+internal\+::dcdate\+\_\+nondimcheck(), and dc\+\_\+date\+\_\+internal\+::dcdate\+\_\+normalize().


\begin{DoxyCode}
60     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__internal}{dc\_date\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__date__internal_ac3f0935623089b447b453928ff99b788}{dcdate\_normalize}, 
      \hyperlink{namespacedc__date__internal_ad90bad9c02e4b49abc3d68572bb74798}{dcdate\_nondimcheck}
61     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}, \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}
62     \textcolor{keywordtype}{use }\hyperlink{namespacedc__scaledsec}{dc\_scaledsec}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-)
63     \textcolor{keywordtype}{implicit none}
64     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}):: result
65     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: diff1, diff2
66   \textcolor{keywordflow}{continue}
67     result % mon = diff1 % mon - diff2 % mon
68     result % day = diff1 % day - diff2 % day
69     result % sec = diff1 % sec - diff2 % sec
70     result % day\_seconds = diff1 % day\_seconds
71     \textcolor{keyword}{call }\hyperlink{namespacedc__date__internal_ad90bad9c02e4b49abc3d68572bb74798}{dcdate\_nondimcheck}(\textcolor{keyword}{operator}\textcolor{stringliteral}{'dc\_date#(-)'}, diff1, diff2, result)
72     \textcolor{keyword}{call }\hyperlink{namespacedc__date__internal_ac3f0935623089b447b453928ff99b788}{dcdate\_normalize}(result % day, result % sec, result % day\_seconds, result %
       nondim\_flag)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dcdatetimesub_8f90_a85b2f826452cc9ba7c5d1186e385fbc0_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{dcdatetimesub_8f90_a907ed72bd1e0b9d787ddb1a052697a80}\label{dcdatetimesub_8f90_a907ed72bd1e0b9d787ddb1a052697a80}} 
\index{dcdatetimesub.\+f90@{dcdatetimesub.\+f90}!dcdatetime\+\_\+sub\+\_\+fi@{dcdatetime\+\_\+sub\+\_\+fi}}
\index{dcdatetime\+\_\+sub\+\_\+fi@{dcdatetime\+\_\+sub\+\_\+fi}!dcdatetimesub.\+f90@{dcdatetimesub.\+f90}}
\subsubsection{\texorpdfstring{dcdatetime\+\_\+sub\+\_\+fi()}{dcdatetime\_sub\_fi()}}
{\footnotesize\ttfamily type(dc\+\_\+difftime) function dcdatetime\+\_\+sub\+\_\+fi (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{diff,  }\item[{integer, intent(in)}]{sec }\end{DoxyParamCaption})}



Definition at line 106 of file dcdatetimesub.\+f90.



References dc\+\_\+types\+::dp.


\begin{DoxyCode}
106     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-)
107     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}, \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}
108     \textcolor{keywordtype}{use }\hyperlink{namespacedc__scaledsec}{dc\_scaledsec}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-)
109     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
110     \textcolor{keywordtype}{implicit none}
111     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}):: result
112     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: diff
113     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: sec
114   \textcolor{keywordflow}{continue}
115     result = diff - \textcolor{keywordtype}{real}( sec, \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp} )
\end{DoxyCode}
\mbox{\Hypertarget{dcdatetimesub_8f90_aa33957fc7818948472b72080fc9f5c24}\label{dcdatetimesub_8f90_aa33957fc7818948472b72080fc9f5c24}} 
\index{dcdatetimesub.\+f90@{dcdatetimesub.\+f90}!dcdatetime\+\_\+sub\+\_\+fr@{dcdatetime\+\_\+sub\+\_\+fr}}
\index{dcdatetime\+\_\+sub\+\_\+fr@{dcdatetime\+\_\+sub\+\_\+fr}!dcdatetimesub.\+f90@{dcdatetimesub.\+f90}}
\subsubsection{\texorpdfstring{dcdatetime\+\_\+sub\+\_\+fr()}{dcdatetime\_sub\_fr()}}
{\footnotesize\ttfamily type(dc\+\_\+difftime) function dcdatetime\+\_\+sub\+\_\+fr (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{diff,  }\item[{real, intent(in)}]{sec }\end{DoxyParamCaption})}



Definition at line 93 of file dcdatetimesub.\+f90.



References dc\+\_\+types\+::dp.


\begin{DoxyCode}
93     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-)
94     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}, \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}
95     \textcolor{keywordtype}{use }\hyperlink{namespacedc__scaledsec}{dc\_scaledsec}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-)
96     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
97     \textcolor{keywordtype}{implicit none}
98     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}):: result
99     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: diff
100     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: sec
101   \textcolor{keywordflow}{continue}
102     result = diff - \textcolor{keywordtype}{real}( sec, \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp} )
\end{DoxyCode}
\mbox{\Hypertarget{dcdatetimesub_8f90_a3fca3a83ac3c7792b1b95ac2e0f91330}\label{dcdatetimesub_8f90_a3fca3a83ac3c7792b1b95ac2e0f91330}} 
\index{dcdatetimesub.\+f90@{dcdatetimesub.\+f90}!dcdatetime\+\_\+sub\+\_\+tf@{dcdatetime\+\_\+sub\+\_\+tf}}
\index{dcdatetime\+\_\+sub\+\_\+tf@{dcdatetime\+\_\+sub\+\_\+tf}!dcdatetimesub.\+f90@{dcdatetimesub.\+f90}}
\subsubsection{\texorpdfstring{dcdatetime\+\_\+sub\+\_\+tf()}{dcdatetime\_sub\_tf()}}
{\footnotesize\ttfamily type(dc\+\_\+datetime) function dcdatetime\+\_\+sub\+\_\+tf (\begin{DoxyParamCaption}\item[{type(dc\+\_\+datetime), intent(in)}]{time,  }\item[{type(dc\+\_\+difftime), intent(in)}]{diff }\end{DoxyParamCaption})}



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


\begin{DoxyCode}
11     \textcolor{comment}{!}
12     \textcolor{comment}{! 2 つの日時 (DC\_DATETIME 型) もしくは}
13     \textcolor{comment}{! 日時差 (DC\_DIFFTIME 型)の減算を行います.}
14     \textcolor{comment}{!}
15     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1eval}{eval}, \hyperlink{interfacedc__date__generic_1_1dcdatetimecreate}{dcdatetimecreate}
16     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}, \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}
17     \textcolor{keywordtype}{use }\hyperlink{namespacedc__scaledsec}{dc\_scaledsec}\textcolor{keywordtype}{, only}: \hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}, &
18       & \textcolor{keyword}{operator}(<), \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<=), \textcolor{keyword}{operator}(>=), &
19       & \textcolor{keyword}{operator}(+), \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(*), \textcolor{keyword}{operator}(/), &
20       & \hyperlink{interfacedc__scaledsec_1_1modulo}{modulo}, \hyperlink{interfacedc__scaledsec_1_1int}{int}, \hyperlink{interfacedc__scaledsec_1_1abs}{abs}, \hyperlink{interfacedc__scaledsec_1_1sign}{sign}
21     \textcolor{keywordtype}{implicit none}
22     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}):: result
23     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}), \textcolor{keywordtype}{intent(in)}:: time
24     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: diff
25     \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}):: time\_year, time\_mon, time\_day, time\_sec
26     \textcolor{keywordtype}{integer}:: time\_caltype
27     \textcolor{keywordtype}{character(6)}:: time\_zone
28   \textcolor{keywordflow}{continue}
29     \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1eval}{eval}(time, &
30       & sclyear = time\_year, sclmon = time\_mon, sclday = time\_day, &
31       & sclsec = time\_sec, caltype = time\_caltype, zone = time\_zone )
32     \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdatetimecreate}{dcdatetimecreate}(result, &
33       & sclyear = time\_year, &
34       & sclmon = time\_mon - diff % mon, &
35       & sclday = time\_day - diff % day, &
36       & sclsec = time\_sec - diff % sec, &
37       & caltype = time\_caltype, zone = time\_zone)
\end{DoxyCode}
\mbox{\Hypertarget{dcdatetimesub_8f90_affc22ca7df8916760d0a57f1b436b9ef}\label{dcdatetimesub_8f90_affc22ca7df8916760d0a57f1b436b9ef}} 
\index{dcdatetimesub.\+f90@{dcdatetimesub.\+f90}!dcdatetime\+\_\+sub\+\_\+tt@{dcdatetime\+\_\+sub\+\_\+tt}}
\index{dcdatetime\+\_\+sub\+\_\+tt@{dcdatetime\+\_\+sub\+\_\+tt}!dcdatetimesub.\+f90@{dcdatetimesub.\+f90}}
\subsubsection{\texorpdfstring{dcdatetime\+\_\+sub\+\_\+tt()}{dcdatetime\_sub\_tt()}}
{\footnotesize\ttfamily type(dc\+\_\+difftime) function dcdatetime\+\_\+sub\+\_\+tt (\begin{DoxyParamCaption}\item[{type(dc\+\_\+datetime), intent(in)}]{time1,  }\item[{type(dc\+\_\+datetime), intent(in)}]{time2 }\end{DoxyParamCaption})}



Definition at line 41 of file dcdatetimesub.\+f90.



References dc\+\_\+date\+\_\+internal\+::dcdate\+\_\+normalize().


\begin{DoxyCode}
41     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1evalsclsec}{evalsclsec}, \hyperlink{interfacedc__date__generic_1_1zonetodiff}{zonetodiff}, \textcolor{keyword}{operator}(-)
42     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}, \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}
43     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__internal}{dc\_date\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__date__internal_ac3f0935623089b447b453928ff99b788}{dcdate\_normalize}
44     \textcolor{keywordtype}{use }\hyperlink{namespacedc__scaledsec}{dc\_scaledsec}\textcolor{keywordtype}{, only}: \hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}, &
45       & \textcolor{keyword}{operator}(<), \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<=), \textcolor{keyword}{operator}(>=), &
46       & \textcolor{keyword}{operator}(+), \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(*), \textcolor{keyword}{operator}(/), &
47       & \hyperlink{interfacedc__scaledsec_1_1modulo}{modulo}, \hyperlink{interfacedc__scaledsec_1_1int}{int}, \hyperlink{interfacedc__scaledsec_1_1abs}{abs}, \hyperlink{interfacedc__scaledsec_1_1sign}{sign}
48     \textcolor{keywordtype}{implicit none}
49     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}):: result
50     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}), \textcolor{keywordtype}{intent(in)}:: time1, time2
51   \textcolor{keywordflow}{continue}
52     result % day = time1 % day - time2 % day
53     result % sec = time1 % sec - time2 % sec &
54       & + \hyperlink{interfacedc__date__generic_1_1evalsclsec}{evalsclsec}(\hyperlink{interfacedc__date__generic_1_1zonetodiff}{zonetodiff}(time1 % zone) - \hyperlink{interfacedc__date__generic_1_1zonetodiff}{zonetodiff}(time2 % zone))
55     result % day\_seconds = time1 % day\_seconds
56     \textcolor{keyword}{call }\hyperlink{namespacedc__date__internal_ac3f0935623089b447b453928ff99b788}{dcdate\_normalize}(result % day, result % sec, result % day\_seconds, result %
       nondim\_flag)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dcdatetimesub_8f90_affc22ca7df8916760d0a57f1b436b9ef_cgraph}
\end{center}
\end{figure}
