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