[#absl-ParseLenientCivilTime-0d] = xref:absl.adoc[absl]::ParseLenientCivilTime :relfileprefix: ../ :mrdocs: 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. == Synopsis Declared in `<absl/time/civil_time.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool ParseLenientCivilTime( std::string_view s, xref:absl/CivilSecond.adoc[CivilSecond]* c); ---- == Description Example: absl::CivilDay d; bool ok = absl::ParseLenientCivilTime("1969‐07‐20", &d); // OK ok = absl::ParseLenientCivilTime("1969‐07‐20T10", &d); // OK: T10 floored ok = absl::ParseLenientCivilTime("1969‐07", &d); // OK: day defaults to 1 == Return Value `true` upon successful parsing. == Parameters [cols="1,4"] |=== | Name| Description | *s* | The string to parse. | *c* | Output parameter receiving the parsed civil‐time value. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#