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