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

This complex&hyphen;constrained (value&hyphen;semantic) attribute class describes a range of time in which a particular local time description (offset, DST status, and a descriptive string) is in effect&period; See the  section for information on the class attributes&period; Note that the class invariants are identically the constraints on the attributes&period;

== Synopsis

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

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

== Type Aliases

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


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/baltzo/LocalTimePeriod/2constructor-00.adoc[`LocalTimePeriod`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/baltzo/LocalTimePeriod/2destructor.adoc[`&#126;LocalTimePeriod`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/baltzo/LocalTimePeriod/operator_assign-03.adoc[`operator&equals;`] 
| Assignment operators
| xref:BloombergLP/baltzo/LocalTimePeriod/allocator.adoc[`allocator`] 
| Return `get&lowbar;allocator()&period;mechanism()`&period;
| xref:BloombergLP/baltzo/LocalTimePeriod/descriptor.adoc[`descriptor`] 
| Return a reference providing non&hyphen;modifiable access to the `descriptor` attribute of this object&period;
| xref:BloombergLP/baltzo/LocalTimePeriod/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/LocalTimePeriod/print.adoc[`print`] 
| Write the value of this object to the specified output `stream` in a human&hyphen;readable format, and return a reference 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/LocalTimePeriod/setDescriptor.adoc[`setDescriptor`] 
| Set the `descriptor` attribute to the specified `value`&period;
| xref:BloombergLP/baltzo/LocalTimePeriod/setUtcStartAndEndTime.adoc[`setUtcStartAndEndTime`] 
| Use the specified `utcStartTime` and `utcEndTime` to set the `utcStartTime` and `utcEndTime` attributes of this object respectively&period; The behavior is undefined unless `utcStartTime &equals;&equals; utcEndTime`, or if `utcStartTime` and `utcEndTime` are comparable (i&period;e&period;, neither equals a default constructed `bdlt&colon;&colon;DateTime` object) unless &grave;utcStartTime &lt; utcEndTime`&period; (See the `isValidUtcStartAndEndTime&grave; method&period;)
| xref:BloombergLP/baltzo/LocalTimePeriod/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 `other`&period;
| xref:BloombergLP/baltzo/LocalTimePeriod/utcEndTime.adoc[`utcEndTime`] 
| Return a reference providing non&hyphen;modifiable access to the `utcEndTime` attribute of this object&period;
| xref:BloombergLP/baltzo/LocalTimePeriod/utcStartTime.adoc[`utcStartTime`] 
| Return a reference providing non&hyphen;modifiable access to the `utcStartTime` attribute of this object&period;
| xref:BloombergLP/baltzo/LocalTimePeriod/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;LocalTimePeriod, IsBitwiseMoveable&gt;`] 
| Nested trait declaration for `bslma&colon;&colon;UsesBslmaAllocator`&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/baltzo/LocalTimePeriod/isValidUtcStartAndEndTime.adoc[`isValidUtcStartAndEndTime`] 
| Return `true` if the specified `utcStartTime` and `utcEndTime` have the same value, or if `utcStartTime` and `utcEndTime` are comparable (i&period;e&period;, neither has the value of a default&hyphen;constructed `bdlt&colon;&colon;DateTime` object) and `utcStartTime &lt; utcEndTime`&semi; return `false` otherwise&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/baltzo/operator_not_eq-05.adoc[`operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` objects do not have the same value, and `false` otherwise&period; Two `LocalTimePeriod` objects do not have the same value if the corresponding values of their `descriptor`, `utcStartTime`, or `utcEndTime` attributes are not the same&period;
| xref:BloombergLP/baltzo/operator_eq-06.adoc[`operator&equals;&equals;`]
| Return `true` if the specified `lhs` and `rhs` objects have the same value, and `false` otherwise&period; Two `LocalTimePeriod` objects have the same value if each of their corresponding `descriptor`, `utcStartTime`, and `utcEndTime` attributes have the same value&period;
| xref:BloombergLP/baltzo/swap-0c.adoc[`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;
|===


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