]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/timespan.tex
disable children when the parent is disabled
[wxWidgets.git] / docs / latex / wx / timespan.tex
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: datespan.tex
3 %% Purpose: wxDateSpan documentation
4 %% Author: Vadim Zeitlin
5 %% Modified by:
6 %% Created: 04.04.00
7 %% RCS-ID: $Id$
8 %% Copyright: (c) Vadim Zeitlin
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 \section{\class{wxTimeSpan}}\label{wxtimespan}
13
14 wxTimeSpan class represents a time interval.
15
16 \wxheading{Derived from}
17
18 No base class
19
20 \wxheading{Include files}
21
22 <wx/datetime.h>
23
24 \wxheading{See also}
25
26 \helpref{Date classes overview}{wxdatetimeoverview},\rtfsp
27 \helpref{wxDateTime}{wxdatetime}
28
29 \latexignore{\rtfignore{\wxheading{Function groups}}}
30
31 \membersection{Static functions}
32
33 \membersection{Constructors}
34
35 wxTimeSpan()\\
36 \helpref{wxTimeSpan(hours, min, sec, msec)}{wxtimespan}
37
38 \membersection{Accessors}
39
40 \membersection{Operations}
41
42 \membersection{Tests}
43
44 \membersection{Formatting time spans}
45
46 \helpref{Format}{wxtimespanformat}
47
48 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
49 % Start of member function part %
50 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
51
52 \helponly{\insertatlevel{2}{
53 \wxheading{Members}
54 }}
55
56 \membersection{wxTimeSpan::Format}\label{wxtimespanformat}
57
58 \func{wxString}{Format}{\param{const wxChar * }{format = "\%H:\%M:\%S"}}
59
60 Returns the string containing the formatted representation of the time span.
61 The following format specifiers are allowed after \%:
62
63 \twocolwidtha{5cm}%
64 \begin{twocollist}\itemsep=0pt
65 \twocolitem{H}{number of {\bf H}ours}
66 \twocolitem{M}{number of {\bf M}inutes}
67 \twocolitem{S}{number of {\bf S}econds}
68 \twocolitem{l}{number of mi{\bf l}liseconds}
69 \twocolitem{D}{number of {\bf D}ays}
70 \twocolitem{E}{number of w{\bf E}eks}
71 \twocolitem{\%}{the percent character}
72 \end{twocollist}
73
74 Note that, for example, the number of hours in the description above is not
75 well defined: it can be either the total number of hours (for example, for a
76 time span of $50$ hours this would be $50$) or just the hour part of the time
77 span, which would be $2$ in this case as $50$ hours is equal to $2$ days and
78 $2$ hours.
79
80 wxTimeSpan resolves this ambiguity in the following way: if there had been,
81 indeed, the {\tt \%D} format specified preceding the {\tt \%H}, then it is
82 interpreted as $2$. Otherwise, it is $50$.
83
84 The same applies to all other format specifiers: if they follow a specifier of
85 larger unit, only the rest part is taken, otherwise the full value is used.
86