1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% Purpose: wxDateSpan documentation
4 %% Author: Vadim Zeitlin
8 %% Copyright: (c) Vadim Zeitlin
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxTimeSpan
}}\label{wxtimespan
}
14 wxTimeSpan class represents a time interval.
16 \wxheading{Derived from
}
20 \wxheading{Include files
}
26 \helpref{Date classes overview
}{wxdatetimeoverview
},
\rtfsp
27 \helpref{wxDateTime
}{wxdatetime
}
29 \latexignore{\rtfignore{\wxheading{Function groups
}}}
31 \membersection{Static functions
}
33 \membersection{Constructors
}
35 \helpref{wxTimeSpan()
}{wxtimespandef
}
36 \helpref{wxTimeSpan(hours, min, sec, msec)
}{wxtimespan
}
38 \membersection{Accessors
}
40 \membersection{Operations
}
44 \membersection{Formatting time spans
}
46 \helpref{Format
}{wxtimespanformat
}
48 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
49 % Start of member function part %
50 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
52 \helponly{\insertatlevel{2}{
56 \membersection{wxTimeSpan::Format
}\label{wxtimespanformat
}
58 \func{wxString
}{Format
}{\param{const wxChar *
}{format = "\%H:\%M:\%S"
}}
60 Returns the string containing the formatted representation of the time span.
61 The following format specifiers are allowed after \%:
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
}
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
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$.
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.