Return true if the specified fields form a valid Time value.

Synopsis

Declared in <bdlt_time.h>

static
bool
isValid(
    int hour,
    int minute = 0,
    int second = 0,
    int millisecond = 0,
    int microsecond = 0);

Description

Return true if the specified hour, and the optionally specified minute, second, millisecond, and microsecond, represent a valid Time value, and false otherwise. Unspecified arguments default to 0. The hour, minute, second, millisecond, and microsecond attributes comprise a valid Time value if 0 <= hour < 24, 0 <= minute < 60, 0 <= second < 60, 0 <= millisecond < 1000, and 0 <= microsecond < 1000. Additionally, 24:00:00.000000 also represents a valid Time value.

Return Value

true if the fields form a valid Time value, and false otherwise

Parameters

Name

Description

hour

hour attribute

minute

minute attribute (default 0)

second

second attribute (default 0)

millisecond

millisecond attribute (default 0)

microsecond

microsecond attribute (default 0)

Created with MrDocs