]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/time.tex
057e59ed0d5d464bb11d770366affd7d53af12aa
[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 \func{}{wxTime}{\param{const wxDate\&}{ date}, \param{hourTy }{h = 0}, \param{minuteTy }{m = 0}, \param{secondTy }{s = 0}, \param{bool }{dst = FALSE}}
60
61 Initialize using a \helpref{wxDate}{wxdate} object, hours, minutes, seconds, and whether DST time.
62
63 \membersection{wxTime::GetDay}\label{wxtimegetday}
64
65 \constfunc{int}{GetDay}{\void}
66
67 Returns the day of the month.
68
69 \membersection{wxTime::GetDayOfWeek}\label{wxtimegetdatofweek}
70
71 \constfunc{int}{GetDayOfWeek}{\void}
72
73 Returns the day of the week, a number from 0 to 6 where 0 is Sunday and 6 is Saturday.
74
75 \membersection{wxTime::GetHour}\label{wxtimegethour}
76
77 \constfunc{hourTy}{GetHour}{\void}
78
79 Returns the hour in local time.
80
81 \membersection{wxTime::GetHourGMT}\label{wxtimegethourgmt}
82
83 \constfunc{hourTy}{GetHourGMT}{\void}
84
85 Returns the hour in GMT.
86
87 \membersection{wxTime::GetMinute}\label{wxtimegetminute}
88
89 \constfunc{minuteTy}{GetMinute}{\void}
90
91 Returns the minute in local time.
92
93 \membersection{wxTime::GetMinuteGMT}\label{wxtimegetminutegmt}
94
95 \constfunc{minuteTy}{GetMinuteGMT}{\void}
96
97 Returns the minute in GMT.
98
99 \membersection{wxTime::GetMonth}\label{wxtimegetmonth}
100
101 \constfunc{int}{GetMonth}{\void}
102
103 Returns the month.
104
105 \membersection{wxTime::GetSecond}\label{wxtimegetsecond}
106
107 \constfunc{secondTy}{GetSecond}{\void}
108
109 Returns the second in local time or GMT.
110
111 \membersection{wxTime::GetSecondGMT}\label{wxtimegetsecondgmt}
112
113 \constfunc{secondTy}{GetSecondGMT}{\void}
114
115 Returns the second in GMT.
116
117 \membersection{wxTime::GetSeconds}\label{wxtimegetseconds}
118
119 \constfunc{clockTy}{GetSeconds}{\void}
120
121 Returns the number of seconds since ???.
122
123 \membersection{wxTime::GetYear}\label{wxtimegetyear}
124
125 \constfunc{int}{GetYear}{\void}
126
127 Returns the year.
128
129 \membersection{wxTime::FormatTime}\label{wxtimeformattime}
130
131 \constfunc{char*}{FormatTime}{\void}
132
133 Formats the time according to the current formatting options: see \helpref{wxTime::SetFormat}{wxtimesetformat}.
134
135 \membersection{wxTime::IsBetween}\label{wxtimeisbetween}
136
137 \constfunc{bool}{IsBetween}{\param{const wxTime\& }{a}, \param{const wxTime\& }{b}}
138
139 Returns TRUE if this time is between the two given times.
140
141 \membersection{wxTime::Max}\label{wxtimemax}
142
143 \constfunc{wxTime}{Max}{\param{const wxTime\& }{time}}
144
145 Returns the maximum of the two times.
146
147 \membersection{wxTime::Min}\label{wxtimemin}
148
149 \constfunc{wxTime}{Min}{\param{const wxTime\& }{time}}
150
151 Returns the minimum of the two times.
152
153 \membersection{wxTime::SetFormat}\label{wxtimesetformat}
154
155 \func{static void}{SetFormat}{\param{const tFormat}{ format = wx12h},
156 \param{const tPrecision}{ precision = wxStdMinSec}}
157
158 Sets the format and precision.
159
160 \membersection{wxTime::operator char*}\label{wxtimestring}
161
162 \func{operator}{char*}{\void}
163
164 Returns a pointer to a static char* containing the formatted time.
165
166 \membersection{wxTime::operator wxDate}\label{wxtimewxdate}
167
168 \constfunc{operator}{wxDate}{\void}
169
170 Converts the wxTime into a wxDate.
171
172 \membersection{wxTime::operator $=$}\label{wxtimeoperator}
173
174 \func{void}{operator $=$}{\param{const wxTime\& }{t}}
175
176 Assignment operator.
177
178 \membersection{wxTime::operator $<$}\label{wxtimeoperatorle}
179
180 \constfunc{bool}{operator $<$}{\param{const wxTime\& }{t}}
181
182 Less than operator.
183
184 \membersection{wxTime::operator $<=$}\label{wxtimeoperatorleq}
185
186 \constfunc{bool}{operator $<=$}{\param{const wxTime\& }{t}}
187
188 Less than or equal to operator.
189
190 \membersection{wxTime::operator $>$}\label{wxtimeoperatorge}
191
192 \constfunc{bool}{operator $>$}{\param{const wxTime\& }{t}}
193
194 Greater than operator.
195
196 \membersection{wxTime::operator $>=$}\label{wxtimeoperatorgeq}
197
198 \constfunc{bool}{operator $>=$}{\param{const wxTime\& }{t}}
199
200 Greater than or equal to operator.
201
202 \membersection{wxTime::operator $==$}\label{wxtimeoperatoreq}
203
204 \constfunc{bool}{operator $==$}{\param{const wxTime\& }{t}}
205
206 Equality operator.
207
208 \membersection{wxTime::operator $!=$}\label{wxtimeoperatorneq}
209
210 \constfunc{bool}{operator $!=$}{\param{const wxTime\& }{t}}
211
212 Inequality operator.
213
214 \membersection{wxTime::operator $+$}\label{wxtimeoperatorplus}
215
216 \constfunc{bool}{operator $+$}{\param{long }{sec}}
217
218 Addition operator.
219
220 \membersection{wxTime::operator $-$}\label{wxtimeoperatorminus}
221
222 \constfunc{bool}{operator $-$}{\param{long }{sec}}
223
224 Subtraction operator.
225
226 \membersection{wxTime::operator $+=$}\label{wxtimeoperatorpluseq}
227
228 \constfunc{bool}{operator $+=$}{\param{long }{sec}}
229
230 Increment operator.
231
232 \membersection{wxTime::operator $-=$}\label{wxtimeoperatorminuseq}
233
234 \constfunc{bool}{operator $-=$}{\param{long }{sec}}
235
236 Decrement operator.
237