]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/time.tex
SetTitle method (internal use only) changed to virtual OnSetTitle, added GetOpenedPag...
[wxWidgets.git] / docs / latex / wx / time.tex
1 \section{\class{wxTime}}\label{wxtime}
2
3 Representation of time and date.
4
5 NOTE: this class should be
6 used with caution, since it is not fully tested. It will be replaced
7 with a new wxDateTime class in the near future.
8
9 \wxheading{Derived from}
10
11 \helpref{wxObject}{wxobject}
12
13 \wxheading{Include files}
14
15 <wx/time.h>
16
17 \wxheading{Data structures}
18
19 {\small \begin{verbatim}
20 typedef unsigned short hourTy;
21 typedef unsigned short minuteTy;
22 typedef unsigned short secondTy;
23 typedef unsigned long clockTy;
24 enum tFormat { wx12h, wx24h };
25 enum tPrecision { wxStdMinSec, wxStdMin };
26 \end{verbatim}}
27
28 \wxheading{See also}
29
30 \helpref{wxDate}{wxDate}
31
32 \latexignore{\rtfignore{\wxheading{Members}}}
33
34 \membersection{wxTime::wxTime}\label{wxtimewxtime}
35
36 \func{}{wxTime}{\void}
37
38 Initialize the object using the current time.
39
40 \func{}{wxTime}{\param{clockTy }{s}}
41
42 Initialize the object using the number of seconds that have elapsed since ???.
43
44 \func{}{wxTime}{\param{const wxTime\&}{ time}}
45
46 Copy constructor.
47
48 \func{}{wxTime}{\param{hourTy }{h}, \param{minuteTy }{m}, \param{secondTy }{s = 0}, \param{bool }{dst = FALSE}}
49
50 Initialize using hours, minutes, seconds, and whether DST time.
51
52 \func{}{wxTime}{\param{const wxDate\&}{ date}, \param{hourTy }{h = 0}, \param{minuteTy }{m = 0}, \param{secondTy }{s = 0}, \param{bool }{dst = FALSE}}
53
54 Initialize using a \helpref{wxDate}{wxdate} object, hours, minutes, seconds, and whether DST time.
55
56 \membersection{wxTime::GetDay}\label{wxtimegetday}
57
58 \constfunc{int}{GetDay}{\void}
59
60 Returns the day of the month.
61
62 \membersection{wxTime::GetDayOfWeek}\label{wxtimegetdatofweek}
63
64 \constfunc{int}{GetDayOfWeek}{\void}
65
66 Returns the day of the week, a number from 0 to 6 where 0 is Sunday and 6 is Saturday.
67
68 \membersection{wxTime::GetHour}\label{wxtimegethour}
69
70 \constfunc{hourTy}{GetHour}{\void}
71
72 Returns the hour in local time.
73
74 \membersection{wxTime::GetHourGMT}\label{wxtimegethourgmt}
75
76 \constfunc{hourTy}{GetHourGMT}{\void}
77
78 Returns the hour in GMT.
79
80 \membersection{wxTime::GetMinute}\label{wxtimegetminute}
81
82 \constfunc{minuteTy}{GetMinute}{\void}
83
84 Returns the minute in local time.
85
86 \membersection{wxTime::GetMinuteGMT}\label{wxtimegetminutegmt}
87
88 \constfunc{minuteTy}{GetMinuteGMT}{\void}
89
90 Returns the minute in GMT.
91
92 \membersection{wxTime::GetMonth}\label{wxtimegetmonth}
93
94 \constfunc{int}{GetMonth}{\void}
95
96 Returns the month.
97
98 \membersection{wxTime::GetSecond}\label{wxtimegetsecond}
99
100 \constfunc{secondTy}{GetSecond}{\void}
101
102 Returns the second in local time or GMT.
103
104 \membersection{wxTime::GetSecondGMT}\label{wxtimegetsecondgmt}
105
106 \constfunc{secondTy}{GetSecondGMT}{\void}
107
108 Returns the second in GMT.
109
110 \membersection{wxTime::GetSeconds}\label{wxtimegetseconds}
111
112 \constfunc{clockTy}{GetSeconds}{\void}
113
114 Returns the number of seconds since ???.
115
116 \membersection{wxTime::GetYear}\label{wxtimegetyear}
117
118 \constfunc{int}{GetYear}{\void}
119
120 Returns the year.
121
122 \membersection{wxTime::FormatTime}\label{wxtimeformattime}
123
124 \constfunc{char*}{FormatTime}{\void}
125
126 Formats the time according to the current formatting options: see \helpref{wxTime::SetFormat}{wxtimesetformat}.
127
128 \membersection{wxTime::IsBetween}\label{wxtimeisbetween}
129
130 \constfunc{bool}{IsBetween}{\param{const wxTime\& }{a}, \param{const wxTime\& }{b}}
131
132 Returns TRUE if this time is between the two given times.
133
134 \membersection{wxTime::Max}\label{wxtimemax}
135
136 \constfunc{wxTime}{Max}{\param{const wxTime\& }{time}}
137
138 Returns the maximum of the two times.
139
140 \membersection{wxTime::Min}\label{wxtimemin}
141
142 \constfunc{wxTime}{Min}{\param{const wxTime\& }{time}}
143
144 Returns the minimum of the two times.
145
146 \membersection{wxTime::SetFormat}\label{wxtimesetformat}
147
148 \func{static void}{SetFormat}{\param{const tFormat}{ format = wx12h},
149 \param{const tPrecision}{ precision = wxStdMinSec}}
150
151 Sets the format and precision.
152
153 \membersection{wxTime::operator char*}\label{wxtimestring}
154
155 \func{operator}{char*}{\void}
156
157 Returns a pointer to a static char* containing the formatted time.
158
159 \membersection{wxTime::operator wxDate}\label{wxtimewxdate}
160
161 \constfunc{operator}{wxDate}{\void}
162
163 Converts the wxTime into a wxDate.
164
165 \membersection{wxTime::operator $=$}\label{wxtimeoperator}
166
167 \func{void}{operator $=$}{\param{const wxTime\& }{t}}
168
169 Assignment operator.
170
171 \membersection{wxTime::operator $<$}\label{wxtimeoperatorle}
172
173 \constfunc{bool}{operator $<$}{\param{const wxTime\& }{t}}
174
175 Less than operator.
176
177 \membersection{wxTime::operator $<=$}\label{wxtimeoperatorleq}
178
179 \constfunc{bool}{operator $<=$}{\param{const wxTime\& }{t}}
180
181 Less than or equal to operator.
182
183 \membersection{wxTime::operator $>$}\label{wxtimeoperatorge}
184
185 \constfunc{bool}{operator $>$}{\param{const wxTime\& }{t}}
186
187 Greater than operator.
188
189 \membersection{wxTime::operator $>=$}\label{wxtimeoperatorgeq}
190
191 \constfunc{bool}{operator $>=$}{\param{const wxTime\& }{t}}
192
193 Greater than or equal to operator.
194
195 \membersection{wxTime::operator $==$}\label{wxtimeoperatoreq}
196
197 \constfunc{bool}{operator $==$}{\param{const wxTime\& }{t}}
198
199 Equality operator.
200
201 \membersection{wxTime::operator $!=$}\label{wxtimeoperatorneq}
202
203 \constfunc{bool}{operator $!=$}{\param{const wxTime\& }{t}}
204
205 Inequality operator.
206
207 \membersection{wxTime::operator $+$}\label{wxtimeoperatorplus}
208
209 \constfunc{bool}{operator $+$}{\param{long }{sec}}
210
211 Addition operator.
212
213 \membersection{wxTime::operator $-$}\label{wxtimeoperatorminus}
214
215 \constfunc{bool}{operator $-$}{\param{long }{sec}}
216
217 Subtraction operator.
218
219 \membersection{wxTime::operator $+=$}\label{wxtimeoperatorpluseq}
220
221 \constfunc{bool}{operator $+=$}{\param{long }{sec}}
222
223 Increment operator.
224
225 \membersection{wxTime::operator $-=$}\label{wxtimeoperatorminuseq}
226
227 \constfunc{bool}{operator $-=$}{\param{long }{sec}}
228
229 Decrement operator.
230