\section{KRFCDate Class Reference}
\label{classKRFCDate}\index{KRFCDate@{KRFCDate}}
The KRFCDate class contains functions related to the parsing of dates.  


{\tt \#include $<$krfcdate.h$>$}

\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static time\_\-t {\bf parse\-Date} (const {\bf QString} \&date)
\item 
static time\_\-t {\bf parse\-Date\-ISO8601} (const {\bf QString} \&date)
\item 
static int {\bf local\-UTCOffset} ()
\item 
static {\bf QCString} {\bf rfc2822Date\-String} (time\_\-t utc\-Time, int utc\-Offset)
\item 
static {\bf QCString} {\bf rfc2822Date\-String} (time\_\-t utc\-Time)
\end{CompactItemize}


\subsection{Detailed Description}
The KRFCDate class contains functions related to the parsing of dates. 

\begin{Desc}
\item[Author:]Waldo Bastian $<${\tt bastian@kde.org}$>$ \end{Desc}




Definition at line 32 of file krfcdate.h.

\subsection{Member Function Documentation}
\index{KRFCDate@{KRFCDate}!parseDate@{parseDate}}
\index{parseDate@{parseDate}!KRFCDate@{KRFCDate}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}time\_\-t KRFCDate::parse\-Date (const {\bf QString} \& {\em date})\hspace{0.3cm}{\tt  [static]}}\label{classKRFCDate_e0}


This function tries to parse a string containing a date/time in any of the formats specified by RFC822, RFC850, RFC1036, RFC1123 and RFC2822. 

If the date/time could not be parsed, 0 is returned. If the parsed date is epoch, then epoch+1 is returned so that a valid date will not be confused with an improper date string.

The date/time returned is converted to UTC. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em date}]the date to parse \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the date, or 0 if not possible \end{Desc}


Definition at line 98 of file krfcdate.cpp.\index{KRFCDate@{KRFCDate}!parseDateISO8601@{parseDateISO8601}}
\index{parseDateISO8601@{parseDateISO8601}!KRFCDate@{KRFCDate}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}time\_\-t KRFCDate::parse\-Date\-ISO8601 (const {\bf QString} \& {\em date})\hspace{0.3cm}{\tt  [static]}}\label{classKRFCDate_e1}


This function tries to parse a string containing a date/time in any of the formats specified by {\tt http://www.w3.org/TR/NOTE-datetime.} 

This is a subset of the formats specified in ISO8601.

If the date/time could not be parsed, 0 is returned. If the parsed date is epoch, then epoch+1 is returned so that a valid date will not be confused with an improper date string.

The date/time returned is converted to UTC.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em date}]the date to parse \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the date, or 0 if not possible \end{Desc}


Definition at line 340 of file krfcdate.cpp.

References QString::at(), QString::contains(), QString::find(), QString::find\-Rev(), QString::left(), QString::length(), QString::mid(), QString::remove(), QString::right(), QString\-List::split(), QString::strip\-White\-Space(), and QString::to\-UInt().\index{KRFCDate@{KRFCDate}!localUTCOffset@{localUTCOffset}}
\index{localUTCOffset@{localUTCOffset}!KRFCDate@{KRFCDate}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KRFCDate::local\-UTCOffset ()\hspace{0.3cm}{\tt  [static]}}\label{classKRFCDate_e2}


Returns the local timezone offset to UTC in minutes. 

\begin{Desc}
\item[Returns:]the local timezone offset in minutes \end{Desc}


Definition at line 446 of file krfcdate.cpp.

Referenced by rfc2822Date\-String().\index{KRFCDate@{KRFCDate}!rfc2822DateString@{rfc2822DateString}}
\index{rfc2822DateString@{rfc2822DateString}!KRFCDate@{KRFCDate}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QCString} KRFCDate::rfc2822Date\-String (time\_\-t {\em utc\-Time}, int {\em utc\-Offset})\hspace{0.3cm}{\tt  [static]}}\label{classKRFCDate_e3}


Returns a string representation of the given date and time formated in conformance to RFC2822. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em utc\-Time}]a date and time in UTC \item[{\em utc\-Offset}]the offset to UTC in minutes \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the string representation of the date \end{Desc}


Definition at line 472 of file krfcdate.cpp.

References QCString::sprintf().

Referenced by rfc2822Date\-String().\index{KRFCDate@{KRFCDate}!rfc2822DateString@{rfc2822DateString}}
\index{rfc2822DateString@{rfc2822DateString}!KRFCDate@{KRFCDate}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QCString} KRFCDate::rfc2822Date\-String (time\_\-t {\em utc\-Time})\hspace{0.3cm}{\tt  [static]}}\label{classKRFCDate_e4}


Returns a string representation of the given date and time formated in conformance to RFC2822. 

Provided for convenience, the function is equivalent to rfc2822Date\-String(t, {\bf local\-UTCOffset()}{\rm (p.\,\pageref{classKRFCDate_e2})}).

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em utc\-Time}]a date and time in UTC \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the string representation of the date \end{Desc}


Definition at line 490 of file krfcdate.cpp.

References local\-UTCOffset(), and rfc2822Date\-String().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
krfcdate.h\item 
krfcdate.cpp\end{CompactItemize}
