VCF::DateTimeSpan Class Reference
The
DateTimeSpan represents an absolute delta value between two date time values.
More...
#include <vcf/FoundationKit/DateTime.h>
List of all members.
Detailed Description
The
DateTimeSpan represents an absolute delta value between two date time values.
You can get the individual components of the span by calling the various getYears(), getMonths(), etc methods, or you can get the total amount of time this span covers in a particular format, such the total minutes, or the total seconds. An example of this might look like so:
DateTime dt1(2003,2,10);
DateTime dt2(2003,2,23);
DateTimeSpan span = dt1 - dt2;
int totalHours = span.getTotalHours();
int totalMinutes = span.getTotalMinutes();
int days = span.getDays();
int months = span.getMonths();
int minutes = span.getMinutes();
Constructor & Destructor Documentation
| VCF::DateTimeSpan::DateTimeSpan |
( |
|
) |
[inline] |
|
| VCF::DateTimeSpan::DateTimeSpan |
( |
uint64 |
delta |
) |
[inline] |
|
|
|
Constructs a new time span that begins from now.
The given delta determines how long should be the constructed span. - Parameters:
-
|
| VCF::DateTimeSpan::DateTimeSpan |
( |
const DateTimeSpan & |
rhs |
) |
[inline] |
|
Member Function Documentation
| uint32 VCF::DateTimeSpan::getDays |
( |
|
) |
const |
|
|
|
returns the number of days in this span of time
|
| uint32 VCF::DateTimeSpan::getHours |
( |
|
) |
const |
|
|
|
returns the number of hours in this span of time
|
| uint32 VCF::DateTimeSpan::getMilliseconds |
( |
|
) |
const |
|
|
|
returns the number of milliseconds in this span of time
|
| uint32 VCF::DateTimeSpan::getMinutes |
( |
|
) |
const |
|
|
|
returns the number of minutes in this span of time
|
| uint32 VCF::DateTimeSpan::getMonths |
( |
|
) |
const |
|
|
|
returns the number of months in this span of time
|
| uint32 VCF::DateTimeSpan::getSeconds |
( |
|
) |
const |
|
|
|
returns the number of seconds in this span of time
|
| uint32 VCF::DateTimeSpan::getTotalDays |
( |
|
) |
const |
|
|
|
returns the total number of whole days if this span of time is evaluated in days as the unit of measurement
|
| uint32 VCF::DateTimeSpan::getTotalHours |
( |
|
) |
const |
|
|
|
returns the total number of whole hours if this span of time is evaluated in hours as the unit of measurement
|
| uint64 VCF::DateTimeSpan::getTotalMilliseconds |
( |
|
) |
const |
|
|
|
returns the total number of whole milliseconds if this span of time is evaluated in milliseconds as the unit of measurement
|
| uint32 VCF::DateTimeSpan::getTotalMinutes |
( |
|
) |
const |
|
|
|
returns the total number of whole minutes if this span of time is evaluated in minutes as the unit of measurement
|
| uint32 VCF::DateTimeSpan::getTotalMonths |
( |
|
) |
const |
|
|
|
returns the total number of whole months if this span of time is evaluated in months as the unit of measurement
|
| uint32 VCF::DateTimeSpan::getTotalSeconds |
( |
|
) |
const |
|
|
|
returns the total number of whole seconds if this span of time is evaluated in seconds as the unit of measurement
|
| uint32 VCF::DateTimeSpan::getYears |
( |
|
) |
const |
|
|
|
returns the number of years in this span of time
|
| VCF::DateTimeSpan::operator uint64 |
( |
|
) |
const [inline] |
|
|
|
allows conversion to a uint64 ( POD ) data type
|
| void VCF::DateTimeSpan::subtract |
( |
const DateTime & |
lhs, |
|
|
const DateTime & |
rhs |
|
) |
[protected] |
|
Friends And Related Function Documentation
Member Data Documentation
The documentation for this class was generated from the following file: