Constructors
Synopses
Declared in <baltzo_localdatetime.h>
Create a LocalDatetime object having the (default) attribute values: ` datetimeTz() == bdlt::DatetimeTz() timeZoneId() == "" ` Optionally specify an allocator (e.g., the address of a bslma::Allocator object) to supply memory; otherwise, the default allocator is used.
Create a LocalDatetime object having the same value and the same allocator as the specified original object. The value of original becomes unspecified but valid, and its allocator remains unchanged.
LocalDatetime(bslmf::MovableRef<LocalDatetime> original) noexcept;
Create a LocalDatetime object having default attribute values, using the specified allocator to supply memory.
explicit
LocalDatetime(allocator_type const& allocator);
Create a LocalDatetime object having the same value as the specified original object, using the specified allocator (e.g., the address of a bslma::Allocator object) to supply memory. The allocator of original remains unchanged. If original and the newly created object have the same allocator then the value of original becomes unspecified but valid, and no exceptions will be thrown; otherwise original is unchanged and an exception may be thrown.
LocalDatetime(
bslmf::MovableRef<LocalDatetime> original,
allocator_type const& allocator);
Create a LocalDatetime object having the same value as the specified original object. Optionally specify an allocator (e.g., the address of a bslma::Allocator object) to supply memory; otherwise, the default allocator is used.
LocalDatetime(
LocalDatetime const& original,
allocator_type const& allocator = allocator_type());
Create a LocalDatetime object with attribute values set from the specified datetimeTz and timeZoneId. Optionally specify an allocator (e.g., the address of a bslma::Allocator object) to supply memory; otherwise, the default allocator is used. If timeZoneId is passed as a null pointer, it is treated as an empty string.
LocalDatetime(
bdlt::DatetimeTz const& datetimeTz,
std::string_view const& timeZoneId,
allocator_type const& allocator = allocator_type());
Create a LocalDatetime object with attribute values set from the specified datetimeTz and timeZoneId, using the specified allocator to supply memory. If timeZoneId is passed as a null pointer, it is treated as an empty string.
LocalDatetime(
bdlt::DatetimeTz const& datetimeTz,
char const* timeZoneId,
allocator_type const& allocator = allocator_type());
Parameters
Name |
Description |
datetimeTz |
the datetime and UTC offset |
timeZoneId |
the time zone identifier |
allocator |
the allocator used to supply memory |
Created with MrDocs