[#BloombergLP-bdlt-Iso8601Util-parseRelaxed-0a5]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/Iso8601Util.adoc[Iso8601Util]::parseRelaxed
:relfileprefix: ../../../
:mrdocs:

Parse the specified &quot;relaxed&quot; 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`&period; Return 0 on success, and a non&hyphen;zero value (with no effect) otherwise&period; `string` is assumed to be of the form&colon; &grave; YYYY&hyphen;MM&hyphen;DD(T&verbar; )hh&colon;mm&colon;ss&lcub;(&period;&verbar;,)s&plus;&rcub;&lcub;(&plus;&verbar;&hyphen;)hh&lcub;&colon;&rcub;mm&verbar;Z&rcub; &grave; The &quot;relaxed&quot; format parsed by this function is a superset of the strict ISO 8601 format, currently allowing a SPACE character to be used as a separated (where ISO 8601 requires a `T`)&period; _Exactly_ `string&period;length()` characters are parsed&semi; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `string&period;length()` characters do not&period; If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds&period; If the optional zone designator is present in the `string`, the input is parsed as a `DatetimeTz` value, and as a `Datetime` value otherwise&period; If a leap second is detected (i&period;e&period;, the parsed value of the `second` attribute is 60&semi; see &lcub;Leap Seconds&rcub;), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end&period; If the &quot;hh&colon;mm&colon;ss&quot; portion of `string` is &quot;24&colon;00&colon;00&quot;, then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC&period; The behavior is undefined unless `string&period;data()` is non&hyphen;null&period;

== Synopsis

Declared in `&lt;bdlt&lowbar;iso8601util&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
parseRelaxed(
    xref:BloombergLP/bdlt/Iso8601Util/DatetimeOrDatetimeTz.adoc[DatetimeOrDatetimeTz]* result,
    std::string&lowbar;view const& string);
----

== Description

DEPRECATED&colon; Use `parse` with `configuration&period;relaxed() &equals;&equals; true` instead&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
