[#BloombergLP-bdlt-Iso8601Util-parse-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/Iso8601Util.adoc[Iso8601Util]::parse
:relfileprefix: ../../../
:mrdocs:

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`&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; Default&colon; YYYY&hyphen;MM&hyphen;DD&lcub;(&plus;&verbar;&hyphen;)hh&lcub;&colon;&rcub;mm&verbar;Z&rcub; Basic&colon; YYYYMMDD&lcub;(&plus;&verbar;&hyphen;)hh&lcub;&colon;&rcub;mm&verbar;Z&rcub; &grave; _Exactly_ `length` characters are parsed&semi; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `length` characters do not&period; If the optional zone designator is not present in `string`, UTC is assumed&period; The behavior is undefined unless `0 &lt;&equals; length`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
parse(
    xref:BloombergLP/bdlt/DateTz.adoc[DateTz]* result,
    char const* string,
    xref:BloombergLP/bdlt/Iso8601Util/ssize_t.adoc[ssize&lowbar;t] length,
    xref:BloombergLP/bdlt/Iso8601Util/ParseConfiguration.adoc[ParseConfiguration] configuration = ParseConfiguration());
----


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