Each object of this class represents a (signed) time interval with microsecond resolution. See {The Representation of a Time Interval} for details.
Synopsis
Declared in <bdlt_datetimeinterval.h>
class DatetimeInterval;
Member Functions
Name |
Description |
|
Constructors |
Assign to this object the value of the specified |
|
Add the specified number of |
|
Add the specified number of |
|
Add the specified number of |
|
Add the specified number of |
|
Add the specified field values to this time interval. |
|
Add the specified field values to this interval if the result is valid. |
|
Add the specified number of |
|
Add the specified number of |
|
Add the specified number of |
|
Add the specified number of |
|
Add the specified number of |
|
Add the specified number of |
|
Add the specified number of |
|
Add the specified number of |
|
Assign to this object the value read from the specified input stream. |
|
Write this object to the specified output stream using BDEX. |
|
Return the days field of this time interval. |
|
Return the sub‐day portion of this interval in microseconds. |
|
Return the hours field in the canonical representation of the value of this time interval. Note that the return value may be negative. |
|
Return the microseconds field in the canonical representation of the value of this time interval. Note that the return value may be negative. |
|
Return the milliseconds field in the canonical representation of the value of this time interval. Note that the return value may be negative. |
|
Return the minutes field in the canonical representation of the value of this time interval. Note that the return value may be negative. |
|
Add the specified |
|
Subtract the specified |
|
Write this object to the specified output stream in a human‐readable format. |
|
Write a representation of this interval into the specified buffer. |
|
Return the seconds field in the canonical representation of the value of this time interval. Note that the return value may be negative. |
|
Set this time interval to the specified field values. |
|
Set this time interval to the specified field values if valid. |
|
Set the overall value of this object to indicate the specified number of |
|
Set this interval to the specified total number of |
|
Set this interval to the specified total |
|
Set this interval to the specified total number of |
|
Set this interval to the specified total number of |
|
Set this interval to the specified total |
|
Set this interval to the specified total number of |
|
Set this interval to the specified total |
|
Set this interval to the specified total number of |
|
Set this interval from a floating‐point total of |
|
Set this interval from floating‐point |
|
Set this interval to the specified total |
|
Format this datetime interval to the specified output |
|
Return this time interval in integral days, rounded toward 0. |
|
Return the value of this time interval in integral hours, rounded toward 0. Note that the return value may be negative. |
|
Return this time interval as an integral number of microseconds. |
|
Return the value of this time interval in integral milliseconds, rounded towards zero. Note that the return value may be negative. |
|
Return the value of this time interval in integral minutes, rounded toward 0. Note that the return value may be negative. |
|
Return the value of this time interval in integral seconds, rounded toward 0. Note that the return value may be negative. |
|
Return this time interval in seconds as a floating‐point value. |
Static Member Functions
Name |
Description |
Return whether the given field values can form a valid time interval. |
|
|
|
Return the most current BDEX streaming version number supported by this class. |
Static Data Members
Name |
Description |
The maximum interval that is representable by a |
|
The minimum interval that is representable by a |
Friends
Name |
Description |
Pass |
|
Return |
|
Return |
|
Return |
|
Return |
|
Return |
|
Return |
|
Return a |
Non-Member Functions
Name |
Description |
Return the sum of a datetime interval and a datetime. |
|
Return a |
|
Return the sum of the specified |
|
Return a |
|
Return the interval between two datetimes. |
|
Return the difference between the specified |
Created with MrDocs