Name |
Description |
Time [constructor]
|
Constructors |
operator=
|
Assign to this time object the value of the specified rhs object, and return a reference providing modifiable access to this object. |
addHours
|
Increase the value of this time object by the specified number of hours, and return the (signed) number of times that the 23:59:59.999999 ‐ 00:00:00.000000 boundary was crossed in performing the operation. Note that hours may be negative. |
addInterval
|
Increase the value of this time object by the specified interval of time, and return the (signed) number of times that the 23:59:59.999999 ‐ 00:00:00.000000 boundary was crossed in performing the operation. The behavior is undefined unless the number of crossings that would be returned can be represented by an int. |
addMicroseconds
|
Increase the value of this time object by the specified number of microseconds, and return the (signed) number of times that the 23:59:59.999999 ‐ 00:00:00.000000 boundary was crossed in performing the operation. Note that microseconds may be negative. |
addMilliseconds
|
Increase the value of this time object by the specified number of milliseconds, and return the (signed) number of times that the 23:59:59.999999 ‐ 00:00:00.000000 boundary was crossed in performing the operation. Note that milliseconds may be negative. |
addMinutes
|
Increase the value of this time object by the specified number of minutes, and return the (signed) number of times that the 23:59:59.999999 ‐ 00:00:00.000000 boundary was crossed in performing the operation. Note that minutes may be negative. |
addSeconds
|
Increase the value of this time object by the specified number of seconds, and return the (signed) number of times that the 23:59:59.999999 ‐ 00:00:00.000000 boundary was crossed in performing the operation. Note that seconds may be negative. |
addTime
|
Add to the value of this time object the specified (signed) number of hours, and the optionally specified (signed) numbers of minutes, seconds, milliseconds, and microseconds; return the (signed) number of times that the 23:59:59.999999 ‐ 00:00:00.000000 boundary was crossed in performing the operation. Unspecified arguments default to 0. |
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. |
getTime
|
Load, into the specified hour, and the optionally specified minute, second, millisecond, and microsecond, the respective hour, minute, second, millisecond, and microsecond attribute values from this time object. Unspecified arguments default to 0. Supplying 0 for an address argument suppresses the loading of the value for the corresponding attribute, but has no effect on the loading of other attribute values. |
hour
|
Return the value of the hour attribute of this time object. |
microsecond
|
Return the value of the microsecond attribute of this time object. |
millisecond
|
Return the value of the millisecond attribute of this time object. |
minute
|
Return the value of the minute attribute of this time object. |
operator+=
|
Add to this time object the value of the specified rhs datetime interval, and return a reference providing modifiable access to this object. |
operator‐=
|
Subtract from this time object the value of the specified rhs datetime interval, and return a reference providing modifiable access to this object. |
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 this human‐readable 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. |
second
|
Return the value of the second attribute of this time object. |
setHour
|
Set the "hour" attribute of this time object to the specified hour; if hour is 24, set the remaining attributes of this object to 0. The behavior is undefined unless 0 <= hour <= 24. |
setHourIfValid
|
Set the "hour" attribute of this time object to the specified hour value if 0 <= hour <= 24. If 24 == hour, set the remaining attributes to 0. Return 0 on success, and a non‐zero value (with no effect) otherwise. |
setMicrosecond
|
Set the "microsecond" attribute of this time object to the specified microsecond; if the hour attribute is 24, set the hour attribute to 0. The behavior is undefined unless 0 <= microsecond < 1000. |
setMicrosecondIfValid
|
Set the "microsecond" attribute of this time object to the specified microsecond if 0 <= microsecond < 1000; if the hour attribute is 24, set the hour attribute to 0. Return 0 on success, and a non‐zero value (with no effect) otherwise. |
setMillisecond
|
Set the "millisecond" attribute of this time object to the specified millisecond; if the hour attribute is 24, set the hour attribute to 0. The behavior is undefined unless 0 <= millisecond < 1000. |
setMillisecondIfValid
|
Set the "millisecond" attribute of this time object to the specified millisecond if 0 <= millisecond < 1000; if the hour attribute is 24, set the hour attribute to 0. Return 0 on success, and a non‐zero value (with no effect) otherwise. |
setMinute
|
Set the "minute" attribute of this time object to the specified minute; if the hour attribute is 24, set the hour attribute to 0. The behavior is undefined unless 0 <= minute < 60. |
setMinuteIfValid
|
Set the "minute" attribute of this time object to the specified minute if 0 <= minute < 60; if the hour attribute is 24, set the hour attribute to 0. Return 0 on success, and a non‐zero value (with no effect) otherwise. |
setSecond
|
Set the "second" attribute of this time object to the specified second; if the hour attribute is 24, set the hour attribute to 0. The behavior is undefined unless 0 <= second < 60. |
setSecondIfValid
|
Set the "second" attribute of this time object to the specified second if 0 <= second < 60; if the hour attribute is 24, set the hour attribute to 0. Return 0 on success, and a non‐zero value (with no effect) otherwise. |
setTime
|
Set the value of this time object to the specified hour, and the optionally specified minute, second, millisecond, and microsecond. Unspecified arguments default to 0. The behavior is undefined unless all of the specified values are within their valid ranges (see isValid). |
setTimeIfValid
|
Set the value of this time object to the specified hour, and the optionally specified minute, second, millisecond, and microsecond, if they would comprise a valid Time value (see isValid). Return 0 on success, and a non‐zero value (with no effect) otherwise. Unspecified arguments default to 0. |
streamOut
|
Format this time to the specified output stream, and return a reference to the modifiable stream. |
validateAndSetTime
|
Set the value of this time object to the specified hour, and the optionally specified minute, second, and millisecond, if they would comprise a valid Time value (see isValid). Return 0 on success, and a non‐zero value (with no effect) otherwise. Unspecified arguments default to 0. |