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

Write the ISO 8601 representation of the specified `object` to `buffer`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
generate(
    char* buffer,
    xref:BloombergLP/bdlt/Iso8601Util/ssize_t.adoc[ssize&lowbar;t] bufferLength,
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& object);
----

== Description

Write the ISO 8601 representation of the specified `object` to the specified `buffer` of the specified `bufferLength` (in bytes), truncating (if necessary) to `bufferLength`&period; Optionally specify a `configuration` to affect the format of the generated string&period; If `configuration` is not supplied, the process&hyphen;wide default value `Iso8601UtilConfiguration&colon;&colon;defaultConfiguration()` is used&period; Return the number of characters in the formatted string before truncation (not counting a null terminator)&period; If `bufferLength` indicates sufficient capacity, `buffer` is null terminated&period; The behavior is undefined unless `0 &lt;&equals; bufferLength`&period; Note that a buffer of size `k&lowbar;MAX&lowbar;STRLEN &plus; 1` is large enough to hold any string generated by this component (counting a null terminator, if any)&period;

== Return Value

the number of characters in the formatted string

== Parameters

[cols="1,4"]
|===
| Name| Description
| *buffer*
| output buffer for the generated ISO 8601 text
| *bufferLength*
| capacity of `buffer` in bytes
| *object*
| value to format
|===


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