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