[#BloombergLP-baltzo-LocalDatetime]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baltzo.adoc[baltzo]::LocalDatetime
:relfileprefix: ../../
:mrdocs:

This unconstrained (value&hyphen;semantic) attribute class characterizes a date time, offset from UTC, and a time zone identifier represented by a string&period; See the  section for information on the class attributes&period;

== Synopsis

Declared in `&lt;baltzo&lowbar;localdatetime&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class LocalDatetime;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/baltzo/LocalDatetime/allocator_type.adoc[`allocator&lowbar;type`] 
| Allocator type used by this class&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/baltzo/LocalDatetime/2constructor-06d.adoc[`LocalDatetime`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/baltzo/LocalDatetime/2destructor.adoc[`&#126;LocalDatetime`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/baltzo/LocalDatetime/operator_assign-01.adoc[`operator&equals;`] 
| Assignment operators
| xref:BloombergLP/baltzo/LocalDatetime/allocator.adoc[`allocator`] 
| Return `get&lowbar;allocator()&period;mechanism()`&period;
| xref:BloombergLP/baltzo/LocalDatetime/bdexStreamIn.adoc[`bdexStreamIn`] 
| Assign to this object the value read from the specified input `stream` using the specified `version` format, and return a reference to `stream`&period; If `stream` is initially invalid, this operation has no effect&period; If `version` is not supported, this object is unaltered and `stream` is invalidated, but otherwise unmodified&period; If `version` is supported but `stream` becomes invalid during this operation, this object has an undefined, but valid, state&period; Note that no version is read from `stream`&period; See the `bslx` package&hyphen;level documentation for more information on BDEX streaming of value&hyphen;semantic types and containers&period;
| xref:BloombergLP/baltzo/LocalDatetime/bdexStreamOut.adoc[`bdexStreamOut`] 
| Write this object to the specified output `stream`&period;
| xref:BloombergLP/baltzo/LocalDatetime/datetimeTz.adoc[`datetimeTz`] 
| Return a reference providing non&hyphen;modifiable access to the `datetimeTz` attribute of this object&period;
| xref:BloombergLP/baltzo/LocalDatetime/get_allocator.adoc[`get&lowbar;allocator`] 
| Return the allocator used by this object to supply memory&period; Note that if no allocator was supplied at construction the default allocator in effect at construction is used&period;
| xref:BloombergLP/baltzo/LocalDatetime/print.adoc[`print`] 
| Write the value of this object to the specified output `stream` in a human&hyphen;readable format, and return a reference providing modifiable access to `stream`&period; Optionally specify an initial indentation `level`, whose absolute value is incremented recursively for nested objects&period; 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&period; If `level` is negative, suppress indentation of the first line&period; If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`)&period; If `stream` is not valid on entry, this operation has no effect&period; Note that the format is not fully specified, and can change without notice&period;
| xref:BloombergLP/baltzo/LocalDatetime/setDatetimeTz.adoc[`setDatetimeTz`] 
| Set the `datetimeTz` attribute of this object to the specified `value`&period;
| xref:BloombergLP/baltzo/LocalDatetime/setTimeZoneId-0d.adoc[`setTimeZoneId`] 
| `setTimeZoneId` overloads
| xref:BloombergLP/baltzo/LocalDatetime/swap.adoc[`swap`] 
| Efficiently exchange the value of this object with the value of the specified `other` object&period; This method provides the no&hyphen;throw exception&hyphen;safety guarantee&period; The behavior is undefined unless this object was created with the same allocator as was `other`&period;
| xref:BloombergLP/baltzo/LocalDatetime/timeZoneId.adoc[`timeZoneId`] 
| Return a reference providing non&hyphen;modifiable access to the `timeZoneId` attribute of this object&period;
| xref:BloombergLP/baltzo/LocalDatetime/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;LocalDatetime, IsBitwiseMoveable&gt;`] 
| Nested trait declaration for `bslma&colon;&colon;UsesBslmaAllocator`&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/baltzo/LocalDatetime/maxSupportedBdexVersion-08.adoc[`maxSupportedBdexVersion`] 
| `maxSupportedBdexVersion` overloads
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/baltzo/swap-02.adoc[BloombergLP::baltzo::swap]`
| Exchange the values of the specified `a` and `b` objects&period; This function provides the no&hyphen;throw exception&hyphen;safety guarantee if the two objects were created with the same allocator and the basic guarantee otherwise&period;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/baltzo/operator_not_eq-04f.adoc[`operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` objects do not have the same value, and `false` otherwise&period; Two `LocalDatetime` objects do not have the same value if any of the corresponding values of their `datetimeTz` or `timeZoneId` attributes are not the same&period;
| xref:BloombergLP/baltzo/operator_eq-04.adoc[`operator&equals;&equals;`]
| Return `true` if the specified `lhs` and `rhs` objects have the same value, and `false` otherwise&period; Two `LocalDatetime` objects have the same value if all of the corresponding values of their `datetimeTz` and `timeZoneId` attributes are the same&period;
|===


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