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