[#BloombergLP-bdlt-Iso8601Util-parse-08a] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/Iso8601Util.adoc[Iso8601Util]::parse :relfileprefix: ../../../ :mrdocs: `parse` overloads == Synopses Declared in `<bdlt_iso8601util.h>` Parse the specified ISO 8601 `string` as a `bsls::TimeInterval` value, and load the value into the specified `result`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` <Parsed Duration> ` See "Summary of Supported ISO 8601 Duration Representations" for a complete description of this format. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-04a.adoc[parse]( xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval]* result, std::string_view const& string); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-04a.adoc[_» more..._]# Parse the specified ISO 8601 `string` as a `Date` value, and load the value into the specified `result`, using the optionally specified `configuration`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` Default: YYYY‐MM‐DD{(+|‐)hh{:}mm|Z} Basic: YYYYMMDD{(+|‐)hh{:}mm|Z} ` _Exactly_ `string.length()` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `string.length()` characters do not. If the optional zone designator is present in `string`, it is parsed but ignored. The behavior is undefined unless `string.data()` is non‐null. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-01a.adoc[parse]( xref:BloombergLP/bdlt/Date.adoc[Date]* result, std::string_view const& string, xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration()); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-01a.adoc[_» more..._]# Parse the specified ISO 8601 `string` as a `Date` or `DateTz` value, depending on the presence of a zone designator, and load the value into the specified `result`, using the optionally specified `configuration`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` Default: YYYY‐MM‐DD{(+|‐)hh{:}mm|Z} Basic: YYYYMMDD{(+|‐)hh{:}mm|Z} ` _Exactly_ `string.length()` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `string.length()` characters do not. If the optional zone designator is present in the `string`, the input is parsed as a `DateTz` value, and as a `Date` value otherwise. The behavior is undefined unless `string.data()` is non‐null. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-06.adoc[parse]( xref:BloombergLP/bdlt/Iso8601Util/DateOrDateTz.adoc[DateOrDateTz]* result, std::string_view const& string, xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration()); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-06.adoc[_» more..._]# Parse the specified ISO 8601 `string` as a `DateTz` value, and load the value into the specified `result`, using the optionally specified `configuration`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` Default: YYYY‐MM‐DD{(+|‐)hh{:}mm|Z} Basic: YYYYMMDD{(+|‐)hh{:}mm|Z} ` _Exactly_ `string.length()` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `string.length()` characters do not. If the optional zone designator is not present in `string`, UTC is assumed. The behavior is undefined unless `string.data()` is non‐null. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-049.adoc[parse]( xref:BloombergLP/bdlt/DateTz.adoc[DateTz]* result, std::string_view const& string, xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration()); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-049.adoc[_» more..._]# Parse the specified ISO 8601 `string` as a `Datetime` value, and load the value into the specified `result`, using the optionally specified `configuration`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` Default: YYYY‐MM‐DDThh:mm:ss{(.|,)s+}{(+|‐)hh{:}mm|Z} Basic: YYYYMMDDThhmmss{(.|,)s+}{(+|‐)hh{:}mm|Z} ` _Exactly_ `string.length()` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `string.length()` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional zone designator is present in `string`, the resulting `Datetime` value is converted to the equivalent UTC value; if the zone designator is absent, UTC is assumed. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. If the "hh:mm:ss" portion of `string` is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC. The behavior is undefined unless `string.data()` is non‐null. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-006.adoc[parse]( xref:BloombergLP/bdlt/Datetime.adoc[Datetime]* result, std::string_view const& string, xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration()); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-006.adoc[_» more..._]# Parse the specified ISO 8601 `string` as a `Datetime` or `DatetimeTz` value, depending on the presence of a zone designator, and load the value into the specified `result`, using the optionally specified `configuration`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` Default: YYYY‐MM‐DDThh:mm:ss{(.|,)s+}{(+|‐)hh{:}mm|Z} Basic: YYYYMMDDThhmmss{(.|,)s+}{(+|‐)hh{:}mm|Z} ` _Exactly_ `string.length()` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `string.length()` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional zone designator is present in the `string`, the input is parsed as a `DatetimeTz` value, and as a `Datetime` value otherwise. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. If the "hh:mm:ss" portion of `string` is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC. The behavior is undefined unless `string.data()` is non‐null. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-02f.adoc[parse]( xref:BloombergLP/bdlt/Iso8601Util/DatetimeOrDatetimeTz.adoc[DatetimeOrDatetimeTz]* result, std::string_view const& string, xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration()); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-02f.adoc[_» more..._]# Parse the specified ISO 8601 `string` as a `DatetimeTz` value, and load the value into the specified `result`, using the optionally specified `configuration`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` Default: YYYY‐MM‐DDThh:mm:ss{(.|,)s+}{(+|‐)hh{:}mm|Z} Basic: YYYYMMDDThhmmss{(.|,)s+}{(+|‐)hh{:}mm|Z} ` _Exactly_ `string.length()` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `string.length()` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional zone designator is not present in `string`, UTC is assumed. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. If the "hh:mm:ss" portion of `string` is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC. The behavior is undefined unless `string.data()` is non‐null. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-020.adoc[parse]( xref:BloombergLP/bdlt/DatetimeTz.adoc[DatetimeTz]* result, std::string_view const& string, xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration()); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-020.adoc[_» more..._]# Parse the specified ISO 8601 `string` as a `Time` value, and load the value into the specified `result`, using the optionally specified `configuration`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` Default: hh:mm:ss{(.|,)s+}{(+|‐)hh{:}mm|Z} Basic: hhmmss{(.|,)s+}{(+|‐)hh{:}mm|Z} ` _Exactly_ `string.length()` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `string.length()` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional zone designator is present in `string`, the resulting `Time` value is converted to the equivalent UTC time; if the zone designator is absent, UTC is assumed. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. If the "hh:mm:ss" portion of `string` is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC. The behavior is undefined unless `string.data()` is non‐null. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-001.adoc[parse]( xref:BloombergLP/bdlt/Time.adoc[Time]* result, std::string_view const& string, xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration()); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-001.adoc[_» more..._]# Parse the specified initial `length` characters of the specified ISO 8601 `string` as a `bsls::TimeInterval` value, and load the value into the specified `result`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` <Parsed Duration> ` See "Summary of Supported ISO 8601 Duration Representations" for a complete description of this format. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-0f.adoc[parse]( xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval]* result, char const* string, xref:BloombergLP/bdlt/Iso8601Util/ssize_t.adoc[ssize_t] length); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-0f.adoc[_» more..._]# Parse the specified ISO 8601 `string` as a `Time` or `TimeTz` value, depending on the presence of a zone designator, and load the value into the specified `result`, using the optionally specified `configuration`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` Default: hh:mm:ss{(.|,)s+}{(+|‐)hh{:}mm|Z} Basic: hhmmss{(.|,)s+}{(+|‐)hh{:}mm|Z} ` _Exactly_ `string.length()` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `string.length()` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional zone designator is present in the `string`, the input is parsed as a `TimeTz` value, and as a `Time` value otherwise. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. If the "hh:mm:ss" portion of `string` is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC. The behavior is undefined unless `string.data()` is non‐null. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-05.adoc[parse]( xref:BloombergLP/bdlt/Iso8601Util/TimeOrTimeTz.adoc[TimeOrTimeTz]* result, std::string_view const& string, xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration()); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-05.adoc[_» more..._]# Parse the specified ISO 8601 `string` as a `TimeTz` value, and load the value into the specified `result`, using the optionally specified `configuration`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` Default: hh:mm:ss{(.|,)s+}{(+|‐)hh{:}mm|Z} Basic: hhmmss{(.|,)s+}{(+|‐)hh{:}mm|Z} ` _Exactly_ `string.length()` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `string.length()` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional zone designator is not present in `string`, UTC is assumed. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. If the "hh:mm:ss" portion of `string` is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC. The behavior is undefined unless `string.data()` is non‐null. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-03.adoc[parse]( xref:BloombergLP/bdlt/TimeTz.adoc[TimeTz]* result, std::string_view const& string, xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration()); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-03.adoc[_» more..._]# Parse the first `length` characters of ISO 8601 `string` as a `Date`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-088.adoc[parse]( xref:BloombergLP/bdlt/Date.adoc[Date]* result, char const* string, xref:BloombergLP/bdlt/Iso8601Util/ssize_t.adoc[ssize_t] length, xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration()); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-088.adoc[_» more..._]# Parse the specified initial `length` characters of the specified ISO 8601 `string` as a `Date` or `DateTz` value, depending on the presence of a zone designator, and load the value into the specified `result`, using the optionally specified `configuration`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` Default: YYYY‐MM‐DD{(+|‐)hh{:}mm|Z} Basic: YYYYMMDD{(+|‐)hh{:}mm|Z} ` _Exactly_ `length` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `length` characters do not. If the optional zone designator is present in the `string`, the input is parsed as a `DateTz` value, and as a `Date` value otherwise. The behavior is undefined unless `0 <= length`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-008.adoc[parse]( xref:BloombergLP/bdlt/Iso8601Util/DateOrDateTz.adoc[DateOrDateTz]* result, char const* string, xref:BloombergLP/bdlt/Iso8601Util/ssize_t.adoc[ssize_t] length, xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration()); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-008.adoc[_» more..._]# Parse the specified initial `length` characters of the specified ISO 8601 `string` as a `DateTz` value, and load the value into the specified `result`, using the optionally specified `configuration`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` Default: YYYY‐MM‐DD{(+|‐)hh{:}mm|Z} Basic: YYYYMMDD{(+|‐)hh{:}mm|Z} ` _Exactly_ `length` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `length` characters do not. If the optional zone designator is not present in `string`, UTC is assumed. The behavior is undefined unless `0 <= length`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-09.adoc[parse]( xref:BloombergLP/bdlt/DateTz.adoc[DateTz]* result, char const* string, xref:BloombergLP/bdlt/Iso8601Util/ssize_t.adoc[ssize_t] length, xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration()); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-09.adoc[_» more..._]# Parse the specified initial `length` characters of the specified ISO 8601 `string` as a `Datetime` value, and load the value into the specified `result`, using the optionally specified `configuration`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` Default: YYYY‐MM‐DDThh:mm:ss{(.|,)s+}{(+|‐)hh{:}mm|Z} Basic: YYYYMMDDThhmmss{(.|,)s+}{(+|‐)hh{:}mm|Z} ` _Exactly_ `length` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `length` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional zone designator is present in `string`, the resulting `Datetime` value is converted to the equivalent UTC value; if the zone designator is absent, UTC is assumed. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. If the "hh:mm:ss" portion of `string` is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC. The behavior is undefined unless `0 <= length`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-015.adoc[parse]( xref:BloombergLP/bdlt/Datetime.adoc[Datetime]* result, char const* string, xref:BloombergLP/bdlt/Iso8601Util/ssize_t.adoc[ssize_t] length, xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration()); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-015.adoc[_» more..._]# Parse the specified initial `length` characters of the specified ISO 8601 `string` as a `Datetime` or `DatetimeTz` value, depending on the presence of a zone designator, and load the value into the specified `result`, using the optionally specified `configuration`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` Default: YYYY‐MM‐DDThh:mm:ss{(.|,)s+}{(+|‐)hh{:}mm|Z} Basic: YYYYMMDDThhmmss{(.|,)s+}{(+|‐)hh{:}mm|Z} ` _Exactly_ `length` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `length` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional zone designator is present in the `string`, the input is parsed as a `DatetimeTz` value, and as a `Datetime` value otherwise. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. If the "hh:mm:ss" portion of `string` is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC. The behavior is undefined unless `0 <= length`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-024.adoc[parse]( xref:BloombergLP/bdlt/Iso8601Util/DatetimeOrDatetimeTz.adoc[DatetimeOrDatetimeTz]* result, char const* string, xref:BloombergLP/bdlt/Iso8601Util/ssize_t.adoc[ssize_t] length, xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration()); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-024.adoc[_» more..._]# Parse the specified initial `length` characters of the specified ISO 8601 `string` as a `DatetimeTz` value, and load the value into the specified `result`, using the optionally specified `configuration`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` Default: YYYY‐MM‐DDThh:mm:ss{(.|,)s+}{(+|‐)hh{:}mm|Z} Basic: YYYYMMDDThhmmss{(.|,)s+}{(+|‐)hh{:}mm|Z} ` _Exactly_ `length` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `length` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional zone designator is not present in `string`, UTC is assumed. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. If the "hh:mm:ss" portion of `string` is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC. The behavior is undefined unless `0 <= length`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-048.adoc[parse]( xref:BloombergLP/bdlt/DatetimeTz.adoc[DatetimeTz]* result, char const* string, xref:BloombergLP/bdlt/Iso8601Util/ssize_t.adoc[ssize_t] length, xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration()); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-048.adoc[_» more..._]# Parse the specified initial `length` characters of the specified ISO 8601 `string` as a `Time` value, and load the value into the specified `result`, using the optionally specified `configuration`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` Default: hh:mm:ss{(.|,)s+}{(+|‐)hh{:}mm|Z} Basic: hhmmss{(.|,)s+}{(+|‐)hh{:}mm|Z} ` _Exactly_ `length` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `length` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional zone designator is present in `string`, the resulting `Time` value is converted to the equivalent UTC time; if the zone designator is absent, UTC is assumed. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. If the "hh:mm:ss" portion of `string` is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC. The behavior is undefined unless `0 <= length`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-0b6.adoc[parse]( xref:BloombergLP/bdlt/Time.adoc[Time]* result, char const* string, xref:BloombergLP/bdlt/Iso8601Util/ssize_t.adoc[ssize_t] length, xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration()); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-0b6.adoc[_» more..._]# Parse the specified initial `length` characters of the specified ISO 8601 `string` as a `Time` or `TimeTz` value, depending on the presence of a zone designator, and load the value into the specified `result`, using the optionally specified `configuration`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` Default: hh:mm:ss{(.|,)s+}{(+|‐)hh{:}mm|Z} Basic: hhmmss{(.|,)s+}{(+|‐)hh{:}mm|Z} ` _Exactly_ `length` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `length` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional zone designator is present in the `string`, the input is parsed as a `TimeTz` value, and as a `Time` value otherwise. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. If the "hh:mm:ss" portion of `string` is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC. The behavior is undefined unless `0 <= length`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-0b7.adoc[parse]( xref:BloombergLP/bdlt/Iso8601Util/TimeOrTimeTz.adoc[TimeOrTimeTz]* result, char const* string, xref:BloombergLP/bdlt/Iso8601Util/ssize_t.adoc[ssize_t] length, xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration()); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-0b7.adoc[_» more..._]# Parse the specified initial `length` characters of the specified ISO 8601 `string` as a `TimeTz` value, and load the value into the specified `result`, using the optionally specified `configuration`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` Default: hh:mm:ss{(.|,)s+}{(+|‐)hh{:}mm|Z} Basic: hhmmss{(.|,)s+}{(+|‐)hh{:}mm|Z} ` _Exactly_ `length` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `length` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional zone designator is not present in `string`, UTC is assumed. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. If the "hh:mm:ss" portion of `string` is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC. The behavior is undefined unless `0 <= length`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/Iso8601Util/parse-00a.adoc[parse]( xref:BloombergLP/bdlt/TimeTz.adoc[TimeTz]* result, char const* string, xref:BloombergLP/bdlt/Iso8601Util/ssize_t.adoc[ssize_t] length, xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration()); ---- [.small]#xref:BloombergLP/bdlt/Iso8601Util/parse-00a.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#