1998-05-20 10:25:30 -04:00
|
|
|
\section{\class{wxTime}}\label{wxtime}
|
|
|
|
|
1999-01-19 06:00:22 -05:00
|
|
|
Representation of time and date.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
2000-03-14 19:21:49 -05:00
|
|
|
{\bf NOTE:} this class is retained only for compatibility,
|
|
|
|
and has been replaced by \helpref{wxDateTime}{wxdatetime}. wxTime
|
|
|
|
may be withdrawn in future versions of wxWindows.
|
1999-02-09 16:22:58 -05:00
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
1999-02-15 15:41:29 -05:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/time.h>
|
|
|
|
|
1999-01-19 06:00:22 -05:00
|
|
|
\wxheading{Data structures}
|
|
|
|
|
2000-03-17 12:59:56 -05:00
|
|
|
\begin{verbatim}
|
1999-01-19 06:00:22 -05:00
|
|
|
typedef unsigned short hourTy;
|
|
|
|
typedef unsigned short minuteTy;
|
|
|
|
typedef unsigned short secondTy;
|
|
|
|
typedef unsigned long clockTy;
|
|
|
|
enum tFormat { wx12h, wx24h };
|
|
|
|
enum tPrecision { wxStdMinSec, wxStdMin };
|
2000-03-14 19:21:49 -05:00
|
|
|
\end{verbatim}
|
1999-01-19 06:00:22 -05:00
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxDate}{wxDate}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
1999-01-19 06:00:22 -05:00
|
|
|
\membersection{wxTime::wxTime}\label{wxtimewxtime}
|
|
|
|
|
|
|
|
\func{}{wxTime}{\void}
|
|
|
|
|
|
|
|
Initialize the object using the current time.
|
|
|
|
|
|
|
|
\func{}{wxTime}{\param{clockTy }{s}}
|
|
|
|
|
|
|
|
Initialize the object using the number of seconds that have elapsed since ???.
|
|
|
|
|
|
|
|
\func{}{wxTime}{\param{const wxTime\&}{ time}}
|
|
|
|
|
|
|
|
Copy constructor.
|
|
|
|
|
|
|
|
\func{}{wxTime}{\param{hourTy }{h}, \param{minuteTy }{m}, \param{secondTy }{s = 0}, \param{bool }{dst = FALSE}}
|
|
|
|
|
|
|
|
Initialize using hours, minutes, seconds, and whether DST time.
|
|
|
|
|
|
|
|
\func{}{wxTime}{\param{const wxDate\&}{ date}, \param{hourTy }{h = 0}, \param{minuteTy }{m = 0}, \param{secondTy }{s = 0}, \param{bool }{dst = FALSE}}
|
|
|
|
|
|
|
|
Initialize using a \helpref{wxDate}{wxdate} object, hours, minutes, seconds, and whether DST time.
|
|
|
|
|
|
|
|
\membersection{wxTime::GetDay}\label{wxtimegetday}
|
|
|
|
|
|
|
|
\constfunc{int}{GetDay}{\void}
|
|
|
|
|
|
|
|
Returns the day of the month.
|
|
|
|
|
|
|
|
\membersection{wxTime::GetDayOfWeek}\label{wxtimegetdatofweek}
|
|
|
|
|
|
|
|
\constfunc{int}{GetDayOfWeek}{\void}
|
|
|
|
|
|
|
|
Returns the day of the week, a number from 0 to 6 where 0 is Sunday and 6 is Saturday.
|
|
|
|
|
|
|
|
\membersection{wxTime::GetHour}\label{wxtimegethour}
|
|
|
|
|
|
|
|
\constfunc{hourTy}{GetHour}{\void}
|
|
|
|
|
|
|
|
Returns the hour in local time.
|
|
|
|
|
|
|
|
\membersection{wxTime::GetHourGMT}\label{wxtimegethourgmt}
|
|
|
|
|
|
|
|
\constfunc{hourTy}{GetHourGMT}{\void}
|
|
|
|
|
|
|
|
Returns the hour in GMT.
|
|
|
|
|
|
|
|
\membersection{wxTime::GetMinute}\label{wxtimegetminute}
|
|
|
|
|
|
|
|
\constfunc{minuteTy}{GetMinute}{\void}
|
|
|
|
|
|
|
|
Returns the minute in local time.
|
|
|
|
|
|
|
|
\membersection{wxTime::GetMinuteGMT}\label{wxtimegetminutegmt}
|
|
|
|
|
|
|
|
\constfunc{minuteTy}{GetMinuteGMT}{\void}
|
|
|
|
|
|
|
|
Returns the minute in GMT.
|
|
|
|
|
|
|
|
\membersection{wxTime::GetMonth}\label{wxtimegetmonth}
|
|
|
|
|
|
|
|
\constfunc{int}{GetMonth}{\void}
|
|
|
|
|
|
|
|
Returns the month.
|
|
|
|
|
|
|
|
\membersection{wxTime::GetSecond}\label{wxtimegetsecond}
|
|
|
|
|
|
|
|
\constfunc{secondTy}{GetSecond}{\void}
|
|
|
|
|
|
|
|
Returns the second in local time or GMT.
|
|
|
|
|
|
|
|
\membersection{wxTime::GetSecondGMT}\label{wxtimegetsecondgmt}
|
|
|
|
|
|
|
|
\constfunc{secondTy}{GetSecondGMT}{\void}
|
|
|
|
|
|
|
|
Returns the second in GMT.
|
|
|
|
|
|
|
|
\membersection{wxTime::GetSeconds}\label{wxtimegetseconds}
|
|
|
|
|
|
|
|
\constfunc{clockTy}{GetSeconds}{\void}
|
|
|
|
|
|
|
|
Returns the number of seconds since ???.
|
|
|
|
|
|
|
|
\membersection{wxTime::GetYear}\label{wxtimegetyear}
|
|
|
|
|
|
|
|
\constfunc{int}{GetYear}{\void}
|
|
|
|
|
|
|
|
Returns the year.
|
|
|
|
|
|
|
|
\membersection{wxTime::FormatTime}\label{wxtimeformattime}
|
|
|
|
|
|
|
|
\constfunc{char*}{FormatTime}{\void}
|
|
|
|
|
|
|
|
Formats the time according to the current formatting options: see \helpref{wxTime::SetFormat}{wxtimesetformat}.
|
|
|
|
|
|
|
|
\membersection{wxTime::IsBetween}\label{wxtimeisbetween}
|
|
|
|
|
|
|
|
\constfunc{bool}{IsBetween}{\param{const wxTime\& }{a}, \param{const wxTime\& }{b}}
|
|
|
|
|
|
|
|
Returns TRUE if this time is between the two given times.
|
|
|
|
|
|
|
|
\membersection{wxTime::Max}\label{wxtimemax}
|
|
|
|
|
|
|
|
\constfunc{wxTime}{Max}{\param{const wxTime\& }{time}}
|
|
|
|
|
|
|
|
Returns the maximum of the two times.
|
|
|
|
|
|
|
|
\membersection{wxTime::Min}\label{wxtimemin}
|
|
|
|
|
|
|
|
\constfunc{wxTime}{Min}{\param{const wxTime\& }{time}}
|
|
|
|
|
|
|
|
Returns the minimum of the two times.
|
|
|
|
|
|
|
|
\membersection{wxTime::SetFormat}\label{wxtimesetformat}
|
|
|
|
|
|
|
|
\func{static void}{SetFormat}{\param{const tFormat}{ format = wx12h},
|
|
|
|
\param{const tPrecision}{ precision = wxStdMinSec}}
|
|
|
|
|
|
|
|
Sets the format and precision.
|
|
|
|
|
|
|
|
\membersection{wxTime::operator char*}\label{wxtimestring}
|
|
|
|
|
|
|
|
\func{operator}{char*}{\void}
|
|
|
|
|
|
|
|
Returns a pointer to a static char* containing the formatted time.
|
|
|
|
|
|
|
|
\membersection{wxTime::operator wxDate}\label{wxtimewxdate}
|
|
|
|
|
|
|
|
\constfunc{operator}{wxDate}{\void}
|
|
|
|
|
|
|
|
Converts the wxTime into a wxDate.
|
|
|
|
|
|
|
|
\membersection{wxTime::operator $=$}\label{wxtimeoperator}
|
|
|
|
|
|
|
|
\func{void}{operator $=$}{\param{const wxTime\& }{t}}
|
|
|
|
|
|
|
|
Assignment operator.
|
|
|
|
|
|
|
|
\membersection{wxTime::operator $<$}\label{wxtimeoperatorle}
|
|
|
|
|
|
|
|
\constfunc{bool}{operator $<$}{\param{const wxTime\& }{t}}
|
|
|
|
|
|
|
|
Less than operator.
|
|
|
|
|
|
|
|
\membersection{wxTime::operator $<=$}\label{wxtimeoperatorleq}
|
|
|
|
|
|
|
|
\constfunc{bool}{operator $<=$}{\param{const wxTime\& }{t}}
|
|
|
|
|
|
|
|
Less than or equal to operator.
|
|
|
|
|
|
|
|
\membersection{wxTime::operator $>$}\label{wxtimeoperatorge}
|
|
|
|
|
|
|
|
\constfunc{bool}{operator $>$}{\param{const wxTime\& }{t}}
|
|
|
|
|
|
|
|
Greater than operator.
|
|
|
|
|
|
|
|
\membersection{wxTime::operator $>=$}\label{wxtimeoperatorgeq}
|
|
|
|
|
|
|
|
\constfunc{bool}{operator $>=$}{\param{const wxTime\& }{t}}
|
|
|
|
|
|
|
|
Greater than or equal to operator.
|
|
|
|
|
|
|
|
\membersection{wxTime::operator $==$}\label{wxtimeoperatoreq}
|
|
|
|
|
|
|
|
\constfunc{bool}{operator $==$}{\param{const wxTime\& }{t}}
|
|
|
|
|
|
|
|
Equality operator.
|
|
|
|
|
|
|
|
\membersection{wxTime::operator $!=$}\label{wxtimeoperatorneq}
|
|
|
|
|
|
|
|
\constfunc{bool}{operator $!=$}{\param{const wxTime\& }{t}}
|
|
|
|
|
|
|
|
Inequality operator.
|
|
|
|
|
|
|
|
\membersection{wxTime::operator $+$}\label{wxtimeoperatorplus}
|
|
|
|
|
|
|
|
\constfunc{bool}{operator $+$}{\param{long }{sec}}
|
|
|
|
|
|
|
|
Addition operator.
|
|
|
|
|
|
|
|
\membersection{wxTime::operator $-$}\label{wxtimeoperatorminus}
|
|
|
|
|
|
|
|
\constfunc{bool}{operator $-$}{\param{long }{sec}}
|
|
|
|
|
|
|
|
Subtraction operator.
|
|
|
|
|
|
|
|
\membersection{wxTime::operator $+=$}\label{wxtimeoperatorpluseq}
|
|
|
|
|
|
|
|
\constfunc{bool}{operator $+=$}{\param{long }{sec}}
|
|
|
|
|
|
|
|
Increment operator.
|
|
|
|
|
|
|
|
\membersection{wxTime::operator $-=$}\label{wxtimeoperatorminuseq}
|
|
|
|
|
|
|
|
\constfunc{bool}{operator $-=$}{\param{long }{sec}}
|
|
|
|
|
|
|
|
Decrement operator.
|
1998-05-20 10:25:30 -04:00
|
|
|
|