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