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