]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/time.tex
Changes to ProjGen for new sample filenames
[wxWidgets.git] / docs / latex / wx / time.tex
CommitLineData
a660d684
KB
1\section{\class{wxTime}}\label{wxtime}
2
ce3ed50d 3Representation of time and date.
a660d684 4
fa482912
JS
5{\bf NOTE:} this class is retained only for compatibility,
6and has been replaced by \helpref{wxDateTime}{wxdatetime}. wxTime
7may 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}
20typedef unsigned short hourTy;
ce3ed50d 21typedef unsigned short minuteTy;
ce3ed50d 22typedef unsigned short secondTy;
ce3ed50d 23typedef unsigned long clockTy;
ce3ed50d 24enum tFormat { wx12h, wx24h };
ce3ed50d 25enum 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
39Initialize the object using the current time.
40
41\func{}{wxTime}{\param{clockTy }{s}}
42
43Initialize the object using the number of seconds that have elapsed since ???.
44
45\func{}{wxTime}{\param{const wxTime\&}{ time}}
46
47Copy constructor.
48
49\func{}{wxTime}{\param{hourTy }{h}, \param{minuteTy }{m}, \param{secondTy }{s = 0}, \param{bool }{dst = FALSE}}
50
51Initialize 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
55Initialize 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
61Returns the day of the month.
62
63\membersection{wxTime::GetDayOfWeek}\label{wxtimegetdatofweek}
64
65\constfunc{int}{GetDayOfWeek}{\void}
66
67Returns 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
73Returns the hour in local time.
74
75\membersection{wxTime::GetHourGMT}\label{wxtimegethourgmt}
76
77\constfunc{hourTy}{GetHourGMT}{\void}
78
79Returns the hour in GMT.
80
81\membersection{wxTime::GetMinute}\label{wxtimegetminute}
82
83\constfunc{minuteTy}{GetMinute}{\void}
84
85Returns the minute in local time.
86
87\membersection{wxTime::GetMinuteGMT}\label{wxtimegetminutegmt}
88
89\constfunc{minuteTy}{GetMinuteGMT}{\void}
90
91Returns the minute in GMT.
92
93\membersection{wxTime::GetMonth}\label{wxtimegetmonth}
94
95\constfunc{int}{GetMonth}{\void}
96
97Returns the month.
98
99\membersection{wxTime::GetSecond}\label{wxtimegetsecond}
100
101\constfunc{secondTy}{GetSecond}{\void}
102
103Returns the second in local time or GMT.
104
105\membersection{wxTime::GetSecondGMT}\label{wxtimegetsecondgmt}
106
107\constfunc{secondTy}{GetSecondGMT}{\void}
108
109Returns the second in GMT.
110
111\membersection{wxTime::GetSeconds}\label{wxtimegetseconds}
112
113\constfunc{clockTy}{GetSeconds}{\void}
114
115Returns the number of seconds since ???.
116
117\membersection{wxTime::GetYear}\label{wxtimegetyear}
118
119\constfunc{int}{GetYear}{\void}
120
121Returns the year.
122
123\membersection{wxTime::FormatTime}\label{wxtimeformattime}
124
125\constfunc{char*}{FormatTime}{\void}
126
127Formats 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
133Returns 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
139Returns the maximum of the two times.
140
141\membersection{wxTime::Min}\label{wxtimemin}
142
143\constfunc{wxTime}{Min}{\param{const wxTime\& }{time}}
144
145Returns 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
152Sets the format and precision.
153
154\membersection{wxTime::operator char*}\label{wxtimestring}
155
156\func{operator}{char*}{\void}
157
158Returns 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
164Converts the wxTime into a wxDate.
165
166\membersection{wxTime::operator $=$}\label{wxtimeoperator}
167
168\func{void}{operator $=$}{\param{const wxTime\& }{t}}
169
170Assignment operator.
171
172\membersection{wxTime::operator $<$}\label{wxtimeoperatorle}
173
174\constfunc{bool}{operator $<$}{\param{const wxTime\& }{t}}
175
176Less than operator.
177
178\membersection{wxTime::operator $<=$}\label{wxtimeoperatorleq}
179
180\constfunc{bool}{operator $<=$}{\param{const wxTime\& }{t}}
181
182Less than or equal to operator.
183
184\membersection{wxTime::operator $>$}\label{wxtimeoperatorge}
185
186\constfunc{bool}{operator $>$}{\param{const wxTime\& }{t}}
187
188Greater than operator.
189
190\membersection{wxTime::operator $>=$}\label{wxtimeoperatorgeq}
191
192\constfunc{bool}{operator $>=$}{\param{const wxTime\& }{t}}
193
194Greater than or equal to operator.
195
196\membersection{wxTime::operator $==$}\label{wxtimeoperatoreq}
197
198\constfunc{bool}{operator $==$}{\param{const wxTime\& }{t}}
199
200Equality operator.
201
202\membersection{wxTime::operator $!=$}\label{wxtimeoperatorneq}
203
204\constfunc{bool}{operator $!=$}{\param{const wxTime\& }{t}}
205
206Inequality operator.
207
208\membersection{wxTime::operator $+$}\label{wxtimeoperatorplus}
209
210\constfunc{bool}{operator $+$}{\param{long }{sec}}
211
212Addition operator.
213
214\membersection{wxTime::operator $-$}\label{wxtimeoperatorminus}
215
216\constfunc{bool}{operator $-$}{\param{long }{sec}}
217
218Subtraction operator.
219
220\membersection{wxTime::operator $+=$}\label{wxtimeoperatorpluseq}
221
222\constfunc{bool}{operator $+=$}{\param{long }{sec}}
223
224Increment operator.
225
226\membersection{wxTime::operator $-=$}\label{wxtimeoperatorminuseq}
227
228\constfunc{bool}{operator $-=$}{\param{long }{sec}}
229
230Decrement operator.
a660d684 231