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