DatetimeInterval [constructor] | Constructors |
operator= | Assign to this object the value of the specified rhs time interval, and return a reference providing modifiable access to this object. |
addDays | Add to this time interval the specified number of days, and return a reference providing modifiable access to this object. The behavior is undefined unless the resulting time interval value is valid (i.e., the days field must not overflow a 32-bit integer). |
addDaysIfValid | Add to this time interval the specified number of days. Return 0 if the resulting time interval value is valid (i.e., the days field must not overflow an int) and a non-zero value (with no effect) otherwise. |
addHours | Add to this time interval the specified number of hours, and return a reference providing modifiable access to this object. The behavior is undefined unless the resulting time interval value is valid (i.e., the days field must not overflow a 32-bit integer). |
addHoursIfValid | Add to this time interval the specified number of hours. Return 0 if the resulting time interval value is valid (i.e., the days field must not overflow an int) and a non-zero value (with no effect) otherwise. |
addInterval | Add to this time interval the specified number of days, and the optionally specified number of hours, minutes, seconds, milliseconds, and microseconds, and return a reference providing modifiable access to this object. Unspecified arguments default to 0. The behavior is undefined unless the resulting time interval value is valid (i.e., the days field must not overflow a 32-bit integer). Note that the arguments may be supplied using a mixture of positive, negative, and 0 values. |
addIntervalIfValid | Add to this time interval the specified number of days, and the optionally specified number of hours, minutes, seconds, milliseconds, and microseconds. Return 0 if the resulting time interval value is valid (i.e., the days field must not overflow an int) and a non-zero value (with no effect) otherwise. Note that the arguments may be supplied using a mixture of positive, negative, and 0 values. |
addMicroseconds | Add to this time interval the specified number of microseconds, and return a reference providing modifiable access to this object. The behavior is undefined unless the resulting time interval value is valid (i.e., the days field must not overflow a 32-bit integer). |
addMicrosecondsIfValid | Add to this time interval the specified number of microseconds. Return 0 if the resulting time interval value is valid (i.e., the days field must not overflow an int) and a non-zero value (with no effect) otherwise. |
addMilliseconds | Add to this time interval the specified number of milliseconds, and return a reference providing modifiable access to this object. The behavior is undefined unless the resulting time interval value is valid (i.e., the days field must not overflow a 32-bit integer). |
addMillisecondsIfValid | Add to this time interval the specified number of milliseconds. Return 0 if the resulting time interval value is valid (i.e., the days field must not overflow an int) and a non-zero value (with no effect) otherwise. |
addMinutes | Add to this time interval the specified number of minutes, and return a reference providing modifiable access to this object. The behavior is undefined unless the resulting time interval value is valid (i.e., the days field must not overflow a 32-bit integer). |
addMinutesIfValid | Add to this time interval the specified number of minutes. Return 0 if the resulting time interval value is valid (i.e., the days field must not overflow an int) and a non-zero value (with no effect) otherwise. |
addSeconds | Add to this time interval the specified number of seconds, and return a reference providing modifiable access to this object. The behavior is undefined unless the resulting time interval value is valid (i.e., the days field must not overflow a 32-bit integer). |
addSecondsIfValid | Add to this time interval the specified number of seconds. Return 0 if the resulting time interval value is valid (i.e., the days field must not overflow an int) and a non-zero value (with no effect) otherwise. |
bdexStreamIn | Assign to this object the value read from the specified input stream using the specified version format, and return a reference to stream. If stream is initially invalid, this operation has no effect. If version is not supported, this object is unaltered and stream is invalidated, but otherwise unmodified. If version is supported but stream becomes invalid during this operation, this object has an undefined, but valid, state. Note that no version is read from stream. See the bslx package-level documentation for more information on BDEX streaming of value-semantic types and containers. |
bdexStreamOut | Write the value of this object, using the specified version format, to the specified output stream, and return a reference to stream. If stream is initially invalid, this operation has no effect. If version is not supported, stream is invalidated, but otherwise unmodified. Note that version is not written to stream. See the bslx package-level documentation for more information on BDEX streaming of value-semantic types and containers. |
days | Return the days field in the canonical representation of the value of this time interval. Note that the return value may be negative. Also note that the return value is the same as that returned by totalDays. |
fractionalDayInMicroseconds | Return the value of this time interval as an integral number of microseconds modulo the number of microseconds in a day. Note that the return value may be negative. |
hours | Return the hours field in the canonical representation of the value of this time interval. Note that the return value may be negative. |
microseconds | Return the microseconds field in the canonical representation of the value of this time interval. Note that the return value may be negative. |
milliseconds | Return the milliseconds field in the canonical representation of the value of this time interval. Note that the return value may be negative. |
minutes | Return the minutes field in the canonical representation of the value of this time interval. Note that the return value may be negative. |
operator+= | Add to this time interval the value of the specified rhs time interval, and return a reference providing modifiable access to this object. The behavior is undefined unless the resulting time interval value is valid (i.e., the days field must not overflow a 32-bit integer). |
operator-= | Subtract from this time interval the value of the specified rhs time interval, and return a reference providing modifiable access to this object. The behavior is undefined unless the resulting time interval value is valid (i.e., the days field must not overflow a 32-bit integer). |
print | Write the value of this object to the specified output stream in a human-readable format, and return a reference to stream. Optionally specify an initial indentation level, whose absolute value is incremented recursively for nested objects. If level is specified, optionally specify spacesPerLevel, whose absolute value indicates the number of spaces per indentation level for this and all of its nested objects. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by level). If stream is not valid on entry, this operation has no effect. Note that the format is not fully specified, and can change without notice. |
printToBuffer | Efficiently write to the specified result buffer no more than the specified numBytes of a representation of the value of this object. Optionally specify fractionalSecondPrecision digits to indicate how many fractional second digits to output. If fractionalSecondPrecision is not specified then 6 fractional second digits will be output (3 digits for milliseconds and 3 digits for microseconds). Return the number of characters (not including the null character) that would have been written if the limit due to numBytes were not imposed. result is null-terminated unless numBytes is 0. The behavior is undefined unless 0 <= numBytes, 0 <= fractionalSecondPrecision <= 6, and result refers to at least numBytes contiguous bytes. Note that the return value is greater than or equal to numBytes if the output representation was truncated to avoid result overrun. |
seconds | Return the seconds field in the canonical representation of the value of this time interval. Note that the return value may be negative. |
setInterval | Set the time interval represented by this object to the value given by the specified days, and the optionally specified hours, minutes, seconds, milliseconds, and microseconds. Unspecified arguments default to 0. The behavior is undefined unless the resulting time interval value is valid (i.e., the days field must not overflow a 32-bit integer). Note that the arguments may be supplied using a mixture of positive, negative, and 0 values. |
setIntervalIfValid | Set the time interval represented by this object to the value given by the specified days, and the optionally specified hours, minutes, seconds, milliseconds, and microseconds. Unspecified arguments default to 0. Return 0 if the resulting time interval value is valid (i.e., the days field must not overflow an int) and a non-zero value (with no effect) otherwise. Note that the arguments may be supplied using a mixture of positive, negative, and 0 values. |
setTotalDays | Set the overall value of this object to indicate the specified number of days. |
setTotalHours | Set the overall value of this object to indicate the specified number of hours. The behavior is undefined unless the resulting time interval value is valid (i.e., the days field must not overflow a 32-bit integer). |
setTotalHoursIfValid | Set the overall value of this object to indicate the specified number of hours. Return 0 if the resulting time interval value is valid (i.e., the days field must not overflow an int) and a non-zero value (with no effect) otherwise. |
setTotalMicroseconds | Set the overall value of this object to indicate the specified number of microseconds. Note that there is no setTotalMicrosecondsIfValid because no value of microseconds can cause the number of days to overflow. |
setTotalMilliseconds | Set the overall value of this object to indicate the specified number of milliseconds. The behavior is undefined unless the resulting time interval value is valid (i.e., the days field must not overflow a 32-bit integer). |
setTotalMillisecondsIfValid | Set the overall value of this object to indicate the specified number of milliseconds. Return 0 if the resulting time interval value is valid (i.e., the days field must not overflow an int) and a non-zero value (with no effect) otherwise. |
setTotalMinutes | Set the overall value of this object to indicate the specified number of minutes. The behavior is undefined unless the resulting time interval value is valid (i.e., the days field must not overflow a 32-bit integer). |
setTotalMinutesIfValid | Set the overall value of this object to indicate the specified number of minutes. Return 0 if the resulting time interval value is valid (i.e., the days field must not overflow an int) and a non-zero value (with no effect) otherwise. |
setTotalSeconds | Set the overall value of this object to indicate the specified number of seconds. The behavior is undefined unless the resulting time interval value is valid (i.e., the days field must not overflow a 32-bit integer). |
setTotalSecondsFromDouble | Set the overall value of this object to indicate the specified number of seconds. The fractional part of seconds, if any, is rounded to the nearest whole number of microseconds. The behavior is undefined unless the resulting time interval value is valid (i.e., the days field must not overflow a 32-bit integer). |
setTotalSecondsFromDoubleIfValid | Set the overall value of this object to indicate the specified number of seconds. The fractional part of seconds, if any, is rounded to the nearest whole number of microseconds. Return 0 if the resulting time interval value is valid (i.e., the days field must not overflow an int) and a non-zero value (with no effect) otherwise. |
setTotalSecondsIfValid | Set the overall value of this object to indicate the specified number of seconds. Return 0 if the resulting time interval value is valid (i.e., the days field must not overflow an int) and a non-zero value (with no effect) otherwise. |
streamOut | Format this datetime interval to the specified output stream, and return a reference to stream. |
totalDays | Return the value of this time interval in integral days, rounded toward 0. Note that the return value may be negative. Also note that the return value is the same as that returned by days. |
totalHours | Return the value of this time interval in integral hours, rounded toward 0. Note that the return value may be negative. |
totalMicroseconds | Return the value of this time interval as an integral number of microseconds. The behavior is undefined unless the number of microseconds can be represented with a 64-bit signed integer. Note that the return value may be negative. |
totalMilliseconds | Return the value of this time interval in integral milliseconds, rounded towards zero. Note that the return value may be negative. |
totalMinutes | Return the value of this time interval in integral minutes, rounded toward 0. Note that the return value may be negative. |
totalSeconds | Return the value of this time interval in integral seconds, rounded toward 0. Note that the return value may be negative. |
totalSecondsAsDouble | Return the value of this time interval in seconds as a double, potentially with a fractional part. Note that the return value may be negative. Also note that the conversion from the internal representation to double may lose precision. |