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