1 \section{\class{wxTime
}}\label{wxtime
}
3 Representation of time and date.
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.
9 \wxheading{Derived from
}
11 \helpref{wxObject
}{wxobject
}
13 \wxheading{Include files
}
17 \wxheading{Data structures
}
20 typedef unsigned short hourTy;
21 typedef unsigned short minuteTy;
22 typedef unsigned short secondTy;
23 typedef unsigned long clockTy;
24 enum tFormat
{ wx12h, wx24h
};
25 enum tPrecision
{ wxStdMinSec, wxStdMin
};
30 \helpref{wxDate
}{wxdate
}
32 \latexignore{\rtfignore{\wxheading{Members
}}}
34 \membersection{wxTime::wxTime
}\label{wxtimewxtime
}
36 \func{}{wxTime
}{\void}
38 Initialize the object using the current time.
40 \func{}{wxTime
}{\param{clockTy
}{s
}}
42 Initialize the object using the number of seconds that have elapsed since ???.
44 \func{}{wxTime
}{\param{const wxTime\&
}{ time
}}
48 \func{}{wxTime
}{\param{hourTy
}{h
},
\param{minuteTy
}{m
},
\param{secondTy
}{s =
0},
\param{bool
}{dst = false
}}
50 Initialize using hours, minutes, seconds, and whether DST time.
52 \func{}{wxTime
}{\param{const wxDate\&
}{ date
},
\param{hourTy
}{h =
0},
\param{minuteTy
}{m =
0},
\param{secondTy
}{s =
0},
\param{bool
}{dst = false
}}
54 Initialize using a
\helpref{wxDate
}{wxdate
} object, hours, minutes, seconds, and whether DST time.
56 \membersection{wxTime::GetDay
}\label{wxtimegetday
}
58 \constfunc{int
}{GetDay
}{\void}
60 Returns the day of the month.
62 \membersection{wxTime::GetDayOfWeek
}\label{wxtimegetdatofweek
}
64 \constfunc{int
}{GetDayOfWeek
}{\void}
66 Returns the day of the week, a number from
0 to
6 where
0 is Sunday and
6 is Saturday.
68 \membersection{wxTime::GetHour
}\label{wxtimegethour
}
70 \constfunc{hourTy
}{GetHour
}{\void}
72 Returns the hour in local time.
74 \membersection{wxTime::GetHourGMT
}\label{wxtimegethourgmt
}
76 \constfunc{hourTy
}{GetHourGMT
}{\void}
78 Returns the hour in GMT.
80 \membersection{wxTime::GetMinute
}\label{wxtimegetminute
}
82 \constfunc{minuteTy
}{GetMinute
}{\void}
84 Returns the minute in local time.
86 \membersection{wxTime::GetMinuteGMT
}\label{wxtimegetminutegmt
}
88 \constfunc{minuteTy
}{GetMinuteGMT
}{\void}
90 Returns the minute in GMT.
92 \membersection{wxTime::GetMonth
}\label{wxtimegetmonth
}
94 \constfunc{int
}{GetMonth
}{\void}
98 \membersection{wxTime::GetSecond
}\label{wxtimegetsecond
}
100 \constfunc{secondTy
}{GetSecond
}{\void}
102 Returns the second in local time or GMT.
104 \membersection{wxTime::GetSecondGMT
}\label{wxtimegetsecondgmt
}
106 \constfunc{secondTy
}{GetSecondGMT
}{\void}
108 Returns the second in GMT.
110 \membersection{wxTime::GetSeconds
}\label{wxtimegetseconds
}
112 \constfunc{clockTy
}{GetSeconds
}{\void}
114 Returns the number of seconds since ???.
116 \membersection{wxTime::GetYear
}\label{wxtimegetyear
}
118 \constfunc{int
}{GetYear
}{\void}
122 \membersection{wxTime::FormatTime
}\label{wxtimeformattime
}
124 \constfunc{char*
}{FormatTime
}{\void}
126 Formats the time according to the current formatting options: see
\helpref{wxTime::SetFormat
}{wxtimesetformat
}.
128 \membersection{wxTime::IsBetween
}\label{wxtimeisbetween
}
130 \constfunc{bool
}{IsBetween
}{\param{const wxTime\&
}{a
},
\param{const wxTime\&
}{b
}}
132 Returns true if this time is between the two given times.
134 \membersection{wxTime::Max
}\label{wxtimemax
}
136 \constfunc{wxTime
}{Max
}{\param{const wxTime\&
}{time
}}
138 Returns the maximum of the two times.
140 \membersection{wxTime::Min
}\label{wxtimemin
}
142 \constfunc{wxTime
}{Min
}{\param{const wxTime\&
}{time
}}
144 Returns the minimum of the two times.
146 \membersection{wxTime::SetFormat
}\label{wxtimesetformat
}
148 \func{static void
}{SetFormat
}{\param{const tFormat
}{ format = wx12h
},
149 \param{const tPrecision
}{ precision = wxStdMinSec
}}
151 Sets the format and precision.
153 \membersection{wxTime::operator char*
}\label{wxtimestring
}
155 \func{operator
}{char*
}{\void}
157 Returns a pointer to a static char* containing the formatted time.
159 \membersection{wxTime::operator wxDate
}\label{wxtimewxdate
}
161 \constfunc{operator
}{wxDate
}{\void}
163 Converts the wxTime into a wxDate.
165 \membersection{wxTime::operator $=$
}\label{wxtimeoperator
}
167 \func{void
}{operator $=$
}{\param{const wxTime\&
}{t
}}
171 \membersection{wxTime::operator $<$
}\label{wxtimeoperatorle
}
173 \constfunc{bool
}{operator $<$
}{\param{const wxTime\&
}{t
}}
177 \membersection{wxTime::operator $<=$
}\label{wxtimeoperatorleq
}
179 \constfunc{bool
}{operator $<=$
}{\param{const wxTime\&
}{t
}}
181 Less than or equal to operator.
183 \membersection{wxTime::operator $>$
}\label{wxtimeoperatorge
}
185 \constfunc{bool
}{operator $>$
}{\param{const wxTime\&
}{t
}}
187 Greater than operator.
189 \membersection{wxTime::operator $>=$
}\label{wxtimeoperatorgeq
}
191 \constfunc{bool
}{operator $>=$
}{\param{const wxTime\&
}{t
}}
193 Greater than or equal to operator.
195 \membersection{wxTime::operator $==$
}\label{wxtimeoperatoreq
}
197 \constfunc{bool
}{operator $==$
}{\param{const wxTime\&
}{t
}}
201 \membersection{wxTime::operator $!=$
}\label{wxtimeoperatorneq
}
203 \constfunc{bool
}{operator $!=$
}{\param{const wxTime\&
}{t
}}
207 \membersection{wxTime::operator $+$
}\label{wxtimeoperatorplus
}
209 \constfunc{bool
}{operator $+$
}{\param{long
}{sec
}}
213 \membersection{wxTime::operator $-$
}\label{wxtimeoperatorminus
}
215 \constfunc{bool
}{operator $-$
}{\param{long
}{sec
}}
217 Subtraction operator.
219 \membersection{wxTime::operator $+=$
}\label{wxtimeoperatorpluseq
}
221 \constfunc{bool
}{operator $+=$
}{\param{long
}{sec
}}
225 \membersection{wxTime::operator $-=$
}\label{wxtimeoperatorminuseq
}
227 \constfunc{bool
}{operator $-=$
}{\param{long
}{sec
}}