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
}
19 {\small \begin{verbatim
}
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
};
31 \helpref{wxDate
}{wxDate
}
33 \latexignore{\rtfignore{\wxheading{Members
}}}
35 \membersection{wxTime::wxTime
}\label{wxtimewxtime
}
37 \func{}{wxTime
}{\void}
39 Initialize the object using the current time.
41 \func{}{wxTime
}{\param{clockTy
}{s
}}
43 Initialize the object using the number of seconds that have elapsed since ???.
45 \func{}{wxTime
}{\param{const wxTime\&
}{ time
}}
49 \func{}{wxTime
}{\param{hourTy
}{h
},
\param{minuteTy
}{m
},
\param{secondTy
}{s =
0},
\param{bool
}{dst = FALSE
}}
51 Initialize using hours, minutes, seconds, and whether DST time.
53 \func{}{wxTime
}{\param{const wxDate\&
}{ date
},
\param{hourTy
}{h =
0},
\param{minuteTy
}{m =
0},
\param{secondTy
}{s =
0},
\param{bool
}{dst = FALSE
}}
55 Initialize using a
\helpref{wxDate
}{wxdate
} object, hours, minutes, seconds, and whether DST time.
57 \membersection{wxTime::GetDay
}\label{wxtimegetday
}
59 \constfunc{int
}{GetDay
}{\void}
61 Returns the day of the month.
63 \membersection{wxTime::GetDayOfWeek
}\label{wxtimegetdatofweek
}
65 \constfunc{int
}{GetDayOfWeek
}{\void}
67 Returns the day of the week, a number from
0 to
6 where
0 is Sunday and
6 is Saturday.
69 \membersection{wxTime::GetHour
}\label{wxtimegethour
}
71 \constfunc{hourTy
}{GetHour
}{\void}
73 Returns the hour in local time.
75 \membersection{wxTime::GetHourGMT
}\label{wxtimegethourgmt
}
77 \constfunc{hourTy
}{GetHourGMT
}{\void}
79 Returns the hour in GMT.
81 \membersection{wxTime::GetMinute
}\label{wxtimegetminute
}
83 \constfunc{minuteTy
}{GetMinute
}{\void}
85 Returns the minute in local time.
87 \membersection{wxTime::GetMinuteGMT
}\label{wxtimegetminutegmt
}
89 \constfunc{minuteTy
}{GetMinuteGMT
}{\void}
91 Returns the minute in GMT.
93 \membersection{wxTime::GetMonth
}\label{wxtimegetmonth
}
95 \constfunc{int
}{GetMonth
}{\void}
99 \membersection{wxTime::GetSecond
}\label{wxtimegetsecond
}
101 \constfunc{secondTy
}{GetSecond
}{\void}
103 Returns the second in local time or GMT.
105 \membersection{wxTime::GetSecondGMT
}\label{wxtimegetsecondgmt
}
107 \constfunc{secondTy
}{GetSecondGMT
}{\void}
109 Returns the second in GMT.
111 \membersection{wxTime::GetSeconds
}\label{wxtimegetseconds
}
113 \constfunc{clockTy
}{GetSeconds
}{\void}
115 Returns the number of seconds since ???.
117 \membersection{wxTime::GetYear
}\label{wxtimegetyear
}
119 \constfunc{int
}{GetYear
}{\void}
123 \membersection{wxTime::FormatTime
}\label{wxtimeformattime
}
125 \constfunc{char*
}{FormatTime
}{\void}
127 Formats the time according to the current formatting options: see
\helpref{wxTime::SetFormat
}{wxtimesetformat
}.
129 \membersection{wxTime::IsBetween
}\label{wxtimeisbetween
}
131 \constfunc{bool
}{IsBetween
}{\param{const wxTime\&
}{a
},
\param{const wxTime\&
}{b
}}
133 Returns TRUE if this time is between the two given times.
135 \membersection{wxTime::Max
}\label{wxtimemax
}
137 \constfunc{wxTime
}{Max
}{\param{const wxTime\&
}{time
}}
139 Returns the maximum of the two times.
141 \membersection{wxTime::Min
}\label{wxtimemin
}
143 \constfunc{wxTime
}{Min
}{\param{const wxTime\&
}{time
}}
145 Returns the minimum of the two times.
147 \membersection{wxTime::SetFormat
}\label{wxtimesetformat
}
149 \func{static void
}{SetFormat
}{\param{const tFormat
}{ format = wx12h
},
150 \param{const tPrecision
}{ precision = wxStdMinSec
}}
152 Sets the format and precision.
154 \membersection{wxTime::operator char*
}\label{wxtimestring
}
156 \func{operator
}{char*
}{\void}
158 Returns a pointer to a static char* containing the formatted time.
160 \membersection{wxTime::operator wxDate
}\label{wxtimewxdate
}
162 \constfunc{operator
}{wxDate
}{\void}
164 Converts the wxTime into a wxDate.
166 \membersection{wxTime::operator $=$
}\label{wxtimeoperator
}
168 \func{void
}{operator $=$
}{\param{const wxTime\&
}{t
}}
172 \membersection{wxTime::operator $<$
}\label{wxtimeoperatorle
}
174 \constfunc{bool
}{operator $<$
}{\param{const wxTime\&
}{t
}}
178 \membersection{wxTime::operator $<=$
}\label{wxtimeoperatorleq
}
180 \constfunc{bool
}{operator $<=$
}{\param{const wxTime\&
}{t
}}
182 Less than or equal to operator.
184 \membersection{wxTime::operator $>$
}\label{wxtimeoperatorge
}
186 \constfunc{bool
}{operator $>$
}{\param{const wxTime\&
}{t
}}
188 Greater than operator.
190 \membersection{wxTime::operator $>=$
}\label{wxtimeoperatorgeq
}
192 \constfunc{bool
}{operator $>=$
}{\param{const wxTime\&
}{t
}}
194 Greater than or equal to operator.
196 \membersection{wxTime::operator $==$
}\label{wxtimeoperatoreq
}
198 \constfunc{bool
}{operator $==$
}{\param{const wxTime\&
}{t
}}
202 \membersection{wxTime::operator $!=$
}\label{wxtimeoperatorneq
}
204 \constfunc{bool
}{operator $!=$
}{\param{const wxTime\&
}{t
}}
208 \membersection{wxTime::operator $+$
}\label{wxtimeoperatorplus
}
210 \constfunc{bool
}{operator $+$
}{\param{long
}{sec
}}
214 \membersection{wxTime::operator $-$
}\label{wxtimeoperatorminus
}
216 \constfunc{bool
}{operator $-$
}{\param{long
}{sec
}}
218 Subtraction operator.
220 \membersection{wxTime::operator $+=$
}\label{wxtimeoperatorpluseq
}
222 \constfunc{bool
}{operator $+=$
}{\param{long
}{sec
}}
226 \membersection{wxTime::operator $-=$
}\label{wxtimeoperatorminuseq
}
228 \constfunc{bool
}{operator $-=$
}{\param{long
}{sec
}}