1 \section{\class{wxTime
}}\label{wxtime
}
3 Representation of time and date.
5 NOTE: this class should be
6 used with caution, since it is not fully tested. It may be replaced
7 with a new class in the near future.
9 \wxheading{Derived from
}
11 \helpref{wxObject
}{wxobject
}
13 \wxheading{Data structures
}
15 {\small \begin{verbatim
}
16 typedef unsigned short hourTy;
19 {\small \begin{verbatim
}
20 typedef unsigned short minuteTy;
23 {\small \begin{verbatim
}
24 typedef unsigned short secondTy;
27 {\small \begin{verbatim
}
28 typedef unsigned long clockTy;
31 {\small \begin{verbatim
}
32 enum tFormat
{ wx12h, wx24h
};
35 {\small \begin{verbatim
}
36 enum tPrecision
{ wxStdMinSec, wxStdMin
};
41 \helpref{wxDate
}{wxDate
}
43 \latexignore{\rtfignore{\wxheading{Members
}}}
45 \membersection{wxTime::wxTime
}\label{wxtimewxtime
}
47 \func{}{wxTime
}{\void}
49 Initialize the object using the current time.
51 \func{}{wxTime
}{\param{clockTy
}{s
}}
53 Initialize the object using the number of seconds that have elapsed since ???.
55 \func{}{wxTime
}{\param{const wxTime\&
}{ time
}}
59 \func{}{wxTime
}{\param{hourTy
}{h
},
\param{minuteTy
}{m
},
\param{secondTy
}{s =
0},
\param{bool
}{dst = FALSE
}}
61 Initialize using hours, minutes, seconds, and whether DST time.
63 \func{}{wxTime
}{\param{const wxDate\&
}{ date
},
\param{hourTy
}{h =
0},
\param{minuteTy
}{m =
0},
\param{secondTy
}{s =
0},
\param{bool
}{dst = FALSE
}}
65 Initialize using a
\helpref{wxDate
}{wxdate
} object, hours, minutes, seconds, and whether DST time.
67 \membersection{wxTime::GetDay
}\label{wxtimegetday
}
69 \constfunc{int
}{GetDay
}{\void}
71 Returns the day of the month.
73 \membersection{wxTime::GetDayOfWeek
}\label{wxtimegetdatofweek
}
75 \constfunc{int
}{GetDayOfWeek
}{\void}
77 Returns the day of the week, a number from
0 to
6 where
0 is Sunday and
6 is Saturday.
79 \membersection{wxTime::GetHour
}\label{wxtimegethour
}
81 \constfunc{hourTy
}{GetHour
}{\void}
83 Returns the hour in local time.
85 \membersection{wxTime::GetHourGMT
}\label{wxtimegethourgmt
}
87 \constfunc{hourTy
}{GetHourGMT
}{\void}
89 Returns the hour in GMT.
91 \membersection{wxTime::GetMinute
}\label{wxtimegetminute
}
93 \constfunc{minuteTy
}{GetMinute
}{\void}
95 Returns the minute in local time.
97 \membersection{wxTime::GetMinuteGMT
}\label{wxtimegetminutegmt
}
99 \constfunc{minuteTy
}{GetMinuteGMT
}{\void}
101 Returns the minute in GMT.
103 \membersection{wxTime::GetMonth
}\label{wxtimegetmonth
}
105 \constfunc{int
}{GetMonth
}{\void}
109 \membersection{wxTime::GetSecond
}\label{wxtimegetsecond
}
111 \constfunc{secondTy
}{GetSecond
}{\void}
113 Returns the second in local time or GMT.
115 \membersection{wxTime::GetSecondGMT
}\label{wxtimegetsecondgmt
}
117 \constfunc{secondTy
}{GetSecondGMT
}{\void}
119 Returns the second in GMT.
121 \membersection{wxTime::GetSeconds
}\label{wxtimegetseconds
}
123 \constfunc{clockTy
}{GetSeconds
}{\void}
125 Returns the number of seconds since ???.
127 \membersection{wxTime::GetYear
}\label{wxtimegetyear
}
129 \constfunc{int
}{GetYear
}{\void}
133 \membersection{wxTime::FormatTime
}\label{wxtimeformattime
}
135 \constfunc{char*
}{FormatTime
}{\void}
137 Formats the time according to the current formatting options: see
\helpref{wxTime::SetFormat
}{wxtimesetformat
}.
139 \membersection{wxTime::IsBetween
}\label{wxtimeisbetween
}
141 \constfunc{bool
}{IsBetween
}{\param{const wxTime\&
}{a
},
\param{const wxTime\&
}{b
}}
143 Returns TRUE if this time is between the two given times.
145 \membersection{wxTime::Max
}\label{wxtimemax
}
147 \constfunc{wxTime
}{Max
}{\param{const wxTime\&
}{time
}}
149 Returns the maximum of the two times.
151 \membersection{wxTime::Min
}\label{wxtimemin
}
153 \constfunc{wxTime
}{Min
}{\param{const wxTime\&
}{time
}}
155 Returns the minimum of the two times.
157 \membersection{wxTime::SetFormat
}\label{wxtimesetformat
}
159 \func{static void
}{SetFormat
}{\param{const tFormat
}{ format = wx12h
},
160 \param{const tPrecision
}{ precision = wxStdMinSec
}}
162 Sets the format and precision.
164 \membersection{wxTime::operator char*
}\label{wxtimestring
}
166 \func{operator
}{char*
}{\void}
168 Returns a pointer to a static char* containing the formatted time.
170 \membersection{wxTime::operator wxDate
}\label{wxtimewxdate
}
172 \constfunc{operator
}{wxDate
}{\void}
174 Converts the wxTime into a wxDate.
176 \membersection{wxTime::operator $=$
}\label{wxtimeoperator
}
178 \func{void
}{operator $=$
}{\param{const wxTime\&
}{t
}}
182 \membersection{wxTime::operator $<$
}\label{wxtimeoperatorle
}
184 \constfunc{bool
}{operator $<$
}{\param{const wxTime\&
}{t
}}
188 \membersection{wxTime::operator $<=$
}\label{wxtimeoperatorleq
}
190 \constfunc{bool
}{operator $<=$
}{\param{const wxTime\&
}{t
}}
192 Less than or equal to operator.
194 \membersection{wxTime::operator $>$
}\label{wxtimeoperatorge
}
196 \constfunc{bool
}{operator $>$
}{\param{const wxTime\&
}{t
}}
198 Greater than operator.
200 \membersection{wxTime::operator $>=$
}\label{wxtimeoperatorgeq
}
202 \constfunc{bool
}{operator $>=$
}{\param{const wxTime\&
}{t
}}
204 Greater than or equal to operator.
206 \membersection{wxTime::operator $==$
}\label{wxtimeoperatoreq
}
208 \constfunc{bool
}{operator $==$
}{\param{const wxTime\&
}{t
}}
212 \membersection{wxTime::operator $!=$
}\label{wxtimeoperatorneq
}
214 \constfunc{bool
}{operator $!=$
}{\param{const wxTime\&
}{t
}}
218 \membersection{wxTime::operator $+$
}\label{wxtimeoperatorplus
}
220 \constfunc{bool
}{operator $+$
}{\param{long
}{sec
}}
224 \membersection{wxTime::operator $-$
}\label{wxtimeoperatorminus
}
226 \constfunc{bool
}{operator $-$
}{\param{long
}{sec
}}
228 Subtraction operator.
230 \membersection{wxTime::operator $+=$
}\label{wxtimeoperatorpluseq
}
232 \constfunc{bool
}{operator $+=$
}{\param{long
}{sec
}}
236 \membersection{wxTime::operator $-=$
}\label{wxtimeoperatorminuseq
}
238 \constfunc{bool
}{operator $-=$
}{\param{long
}{sec
}}