Return true if localDatetime and offset form a valid DatetimeTz.
Declared in <bdlt_datetimetz.h>
static
bool
isValid(
Datetime const& localDatetime,
int offset);
Return true if the specified localDatetime and the specified time zone offset represent a valid DatetimeTz value, and false otherwise. A localDatetime and offset represent a valid DatetimeTz value if either bdlt::Time() == localDatetime.time() and 0 == offset, or bdlt::Time() != localDatetime.time() and offset is in the range ( -1440 .. 1440 ). Note that a true result from this function does not guarantee that offset corresponds to any geographical or historical time zone. Also note that a true result from this function does not guarantee that localDatetime itself is a valid Datetime object.
true if valid, and false otherwise
| Name | Description |
|---|---|
| localDatetime | local datetime to validate |
| offset | time zone offset from UTC in minutes |