Parses any of the formats accepted by absl::ParseCivilTime(). Unlike ParseCivilTime(), the input string format does not need to match the target civil‐time type. Discrepancies are resolved as follows: * Extra components in the input string are ignored. * Missing components are defaulted to their minimum valid values. This behavior is consistent with civil‐time converting constructors.

Synopses

Declared in <absl/time/civil_time.h>

bool
ParseLenientCivilTime(
    std::string_view s,
    CivilDay* c);
bool
ParseLenientCivilTime(
    std::string_view s,
    CivilHour* c);
bool
ParseLenientCivilTime(
    std::string_view s,
    CivilMinute* c);
bool
ParseLenientCivilTime(
    std::string_view s,
    CivilMonth* c);

Parses any of the formats accepted by absl::ParseCivilTime(). Unlike ParseCivilTime(), the input string format does not need to match the target civil‐time type. Discrepancies are resolved as follows: * Extra components in the input string are ignored. * Missing components are defaulted to their minimum valid values. This behavior is consistent with civil‐time converting constructors.

bool
ParseLenientCivilTime(
    std::string_view s,
    CivilSecond* c);
bool
ParseLenientCivilTime(
    std::string_view s,
    CivilYear* c);

Return Value

true upon successful parsing.

Parameters

Name

Description

s

The string to parse.

c

Output parameter receiving the parsed civil‐time value.

Created with MrDocs