1 \section{\class{wxTime
}}\label{wxtime
}
3 Representation of time and date.
5 NOTE: this class should be
6 used with caution, since it is not fully tested. It will be replaced
7 with a new wxDateTime class in the near future.
9 \wxheading{Derived from
}
11 \helpref{wxObject
}{wxobject
}
13 \wxheading{Include files
}
17 \wxheading{Data structures
}
19 {\small \begin{verbatim
}
20 typedef unsigned short hourTy;
23 {\small \begin{verbatim
}
24 typedef unsigned short minuteTy;
27 {\small \begin{verbatim
}
28 typedef unsigned short secondTy;
31 {\small \begin{verbatim
}
32 typedef unsigned long clockTy;
35 {\small \begin{verbatim
}
36 enum tFormat
{ wx12h, wx24h
};
39 {\small \begin{verbatim
}
40 enum tPrecision
{ wxStdMinSec, wxStdMin
};
45 \helpref{wxDate
}{wxDate
}
47 \latexignore{\rtfignore{\wxheading{Members
}}}
49 \membersection{wxTime::wxTime
}\label{wxtimewxtime
}
51 \func{}{wxTime
}{\void}
53 Initialize the object using the current time.
55 \func{}{wxTime
}{\param{clockTy
}{s
}}
57 Initialize the object using the number of seconds that have elapsed since ???.
59 \func{}{wxTime
}{\param{const wxTime\&
}{ time
}}
63 \func{}{wxTime
}{\param{hourTy
}{h
},
\param{minuteTy
}{m
},
\param{secondTy
}{s =
0},
\param{bool
}{dst = FALSE
}}
65 Initialize using hours, minutes, seconds, and whether DST time.
67 \func{}{wxTime
}{\param{const wxDate\&
}{ date
},
\param{hourTy
}{h =
0},
\param{minuteTy
}{m =
0},
\param{secondTy
}{s =
0},
\param{bool
}{dst = FALSE
}}
69 Initialize using a
\helpref{wxDate
}{wxdate
} object, hours, minutes, seconds, and whether DST time.
71 \membersection{wxTime::GetDay
}\label{wxtimegetday
}
73 \constfunc{int
}{GetDay
}{\void}
75 Returns the day of the month.
77 \membersection{wxTime::GetDayOfWeek
}\label{wxtimegetdatofweek
}
79 \constfunc{int
}{GetDayOfWeek
}{\void}
81 Returns the day of the week, a number from
0 to
6 where
0 is Sunday and
6 is Saturday.
83 \membersection{wxTime::GetHour
}\label{wxtimegethour
}
85 \constfunc{hourTy
}{GetHour
}{\void}
87 Returns the hour in local time.
89 \membersection{wxTime::GetHourGMT
}\label{wxtimegethourgmt
}
91 \constfunc{hourTy
}{GetHourGMT
}{\void}
93 Returns the hour in GMT.
95 \membersection{wxTime::GetMinute
}\label{wxtimegetminute
}
97 \constfunc{minuteTy
}{GetMinute
}{\void}
99 Returns the minute in local time.
101 \membersection{wxTime::GetMinuteGMT
}\label{wxtimegetminutegmt
}
103 \constfunc{minuteTy
}{GetMinuteGMT
}{\void}
105 Returns the minute in GMT.
107 \membersection{wxTime::GetMonth
}\label{wxtimegetmonth
}
109 \constfunc{int
}{GetMonth
}{\void}
113 \membersection{wxTime::GetSecond
}\label{wxtimegetsecond
}
115 \constfunc{secondTy
}{GetSecond
}{\void}
117 Returns the second in local time or GMT.
119 \membersection{wxTime::GetSecondGMT
}\label{wxtimegetsecondgmt
}
121 \constfunc{secondTy
}{GetSecondGMT
}{\void}
123 Returns the second in GMT.
125 \membersection{wxTime::GetSeconds
}\label{wxtimegetseconds
}
127 \constfunc{clockTy
}{GetSeconds
}{\void}
129 Returns the number of seconds since ???.
131 \membersection{wxTime::GetYear
}\label{wxtimegetyear
}
133 \constfunc{int
}{GetYear
}{\void}
137 \membersection{wxTime::FormatTime
}\label{wxtimeformattime
}
139 \constfunc{char*
}{FormatTime
}{\void}
141 Formats the time according to the current formatting options: see
\helpref{wxTime::SetFormat
}{wxtimesetformat
}.
143 \membersection{wxTime::IsBetween
}\label{wxtimeisbetween
}
145 \constfunc{bool
}{IsBetween
}{\param{const wxTime\&
}{a
},
\param{const wxTime\&
}{b
}}
147 Returns TRUE if this time is between the two given times.
149 \membersection{wxTime::Max
}\label{wxtimemax
}
151 \constfunc{wxTime
}{Max
}{\param{const wxTime\&
}{time
}}
153 Returns the maximum of the two times.
155 \membersection{wxTime::Min
}\label{wxtimemin
}
157 \constfunc{wxTime
}{Min
}{\param{const wxTime\&
}{time
}}
159 Returns the minimum of the two times.
161 \membersection{wxTime::SetFormat
}\label{wxtimesetformat
}
163 \func{static void
}{SetFormat
}{\param{const tFormat
}{ format = wx12h
},
164 \param{const tPrecision
}{ precision = wxStdMinSec
}}
166 Sets the format and precision.
168 \membersection{wxTime::operator char*
}\label{wxtimestring
}
170 \func{operator
}{char*
}{\void}
172 Returns a pointer to a static char* containing the formatted time.
174 \membersection{wxTime::operator wxDate
}\label{wxtimewxdate
}
176 \constfunc{operator
}{wxDate
}{\void}
178 Converts the wxTime into a wxDate.
180 \membersection{wxTime::operator $=$
}\label{wxtimeoperator
}
182 \func{void
}{operator $=$
}{\param{const wxTime\&
}{t
}}
186 \membersection{wxTime::operator $<$
}\label{wxtimeoperatorle
}
188 \constfunc{bool
}{operator $<$
}{\param{const wxTime\&
}{t
}}
192 \membersection{wxTime::operator $<=$
}\label{wxtimeoperatorleq
}
194 \constfunc{bool
}{operator $<=$
}{\param{const wxTime\&
}{t
}}
196 Less than or equal to operator.
198 \membersection{wxTime::operator $>$
}\label{wxtimeoperatorge
}
200 \constfunc{bool
}{operator $>$
}{\param{const wxTime\&
}{t
}}
202 Greater than operator.
204 \membersection{wxTime::operator $>=$
}\label{wxtimeoperatorgeq
}
206 \constfunc{bool
}{operator $>=$
}{\param{const wxTime\&
}{t
}}
208 Greater than or equal to operator.
210 \membersection{wxTime::operator $==$
}\label{wxtimeoperatoreq
}
212 \constfunc{bool
}{operator $==$
}{\param{const wxTime\&
}{t
}}
216 \membersection{wxTime::operator $!=$
}\label{wxtimeoperatorneq
}
218 \constfunc{bool
}{operator $!=$
}{\param{const wxTime\&
}{t
}}
222 \membersection{wxTime::operator $+$
}\label{wxtimeoperatorplus
}
224 \constfunc{bool
}{operator $+$
}{\param{long
}{sec
}}
228 \membersection{wxTime::operator $-$
}\label{wxtimeoperatorminus
}
230 \constfunc{bool
}{operator $-$
}{\param{long
}{sec
}}
232 Subtraction operator.
234 \membersection{wxTime::operator $+=$
}\label{wxtimeoperatorpluseq
}
236 \constfunc{bool
}{operator $+=$
}{\param{long
}{sec
}}
240 \membersection{wxTime::operator $-=$
}\label{wxtimeoperatorminuseq
}
242 \constfunc{bool
}{operator $-=$
}{\param{long
}{sec
}}