|
BDE 4.14.0 Production release
|
Provide an attribute class to configure ISO 8601 string parsing.
This component provides an unconstrained (value-semantic) attribute class, bdlt::Iso8601UtilParseConfiguration, that may be used to configure various aspects of generated ISO 8601 strings.
relaxed == false means that date and time fields of Datetimes must be separated by t or T. relaxed == true means that they may be separated by t, T, or .basic == false means that year, month and day fields within Dates must be separated by - and hour, minute, and second fields within Times must be separated by :. basic == true means that the fields within Dates and Times must not be separated at all.Note that in parsing, the : between the hour and minute fields of the time zone is always optional.
This section illustrates intended use of this component.
Our type, Iso8601UtilParseConfiguration, has two boolean attributes, basic and relaxed.
A default configured object has both attributes being false:
The setBasic sets the basic attribute, leaves the relaxed attribute alone:
setBasic and setRelaxed take a boolean argument that defaults to true: