[#BloombergLP-bdlt-FixUtil-parse-04a] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/FixUtil.adoc[FixUtil]::parse :relfileprefix: ../../../ :mrdocs: `parse` overloads == Synopses Declared in `<bdlt_fixutil.h>` Parse the specified FIX `string` as a `Date` value, and load the value into the specified `result`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` YYYYMMDD{(+|‐)hh{:mm}|Z} ` _Exactly_ `string.length()` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `string.length()` characters do not. If the optional timezone offset is present in `string`, it is parsed but ignored. The behavior is undefined unless `string.data()` is non‐null. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/FixUtil/parse-06.adoc[parse]( xref:BloombergLP/bdlt/Date.adoc[Date]* result, std::string_view const& string); ---- [.small]#xref:BloombergLP/bdlt/FixUtil/parse-06.adoc[_» more..._]# Parse the specified FIX `string` as a `DateTz` value, and load the value into the specified `result`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` YYYYMMDD{(+|‐)hh{:mm}|Z} ` _Exactly_ `string.length()` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `string.length()` characters do not. If the optional timezone offset is not present in `string`, UTC is assumed. The behavior is undefined unless `string.data()` is non‐null. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/FixUtil/parse-00.adoc[parse]( xref:BloombergLP/bdlt/DateTz.adoc[DateTz]* result, std::string_view const& string); ---- [.small]#xref:BloombergLP/bdlt/FixUtil/parse-00.adoc[_» more..._]# Parse the specified FIX `string` as a `Datetime` value, and load the value into the specified `result`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` YYYYMMDD‐hh:mm{:ss{.s+}}{(+|‐)hh{:mm}|Z} ` _Exactly_ `string.length()` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `string.length()` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional timezone offset is present in `string`, the resulting `Datetime` value is converted to the equivalent UTC value; if the timezone offset is absent, UTC is assumed. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. The behavior is undefined unless `string.data()` is non‐null. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/FixUtil/parse-08.adoc[parse]( xref:BloombergLP/bdlt/Datetime.adoc[Datetime]* result, std::string_view const& string); ---- [.small]#xref:BloombergLP/bdlt/FixUtil/parse-08.adoc[_» more..._]# Parse the specified FIX `string` as a `DatetimeTz` value, and load the value into the specified `result`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` YYYYMMDD‐hh:mm{:ss{.s+}}{(+|‐)hh{:mm}|Z} ` _Exactly_ `string.length()` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `string.length()` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional timezone offset is not present in `string`, UTC is assumed. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. The behavior is undefined unless `string.data()` is non‐null. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/FixUtil/parse-0af.adoc[parse]( xref:BloombergLP/bdlt/DatetimeTz.adoc[DatetimeTz]* result, std::string_view const& string); ---- [.small]#xref:BloombergLP/bdlt/FixUtil/parse-0af.adoc[_» more..._]# Parse the specified FIX `string` as a `Time` value, and load the value into the specified `result`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` hh:mm{:ss{.s+}}{(+|‐)hh{:mm}|Z} ` _Exactly_ `string.length()` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `string.length()` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional timezone offset is present in `string`, the resulting `Time` value is converted to the equivalent UTC time; if the timezone offset is absent, UTC is assumed. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. The behavior is undefined unless `string.data()` is non‐null. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/FixUtil/parse-03.adoc[parse]( xref:BloombergLP/bdlt/Time.adoc[Time]* result, std::string_view const& string); ---- [.small]#xref:BloombergLP/bdlt/FixUtil/parse-03.adoc[_» more..._]# Parse the specified FIX `string` as a `TimeTz` value, and load the value into the specified `result`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` hh:mm{:ss{.s+}}{(+|‐)hh{:mm}|Z} ` _Exactly_ `string.length()` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `string.length()` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional timezone offset is not present in `string`, UTC is assumed. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. The behavior is undefined unless `string.data()` is non‐null. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/FixUtil/parse-0a2.adoc[parse]( xref:BloombergLP/bdlt/TimeTz.adoc[TimeTz]* result, std::string_view const& string); ---- [.small]#xref:BloombergLP/bdlt/FixUtil/parse-0a2.adoc[_» more..._]# Parse the specified initial `length` characters of the specified FIX `string` as a `Date` value, and load the value into the specified `result`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` YYYYMMDD{(+|‐)hh{:mm}|Z} ` _Exactly_ `length` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `length` characters do not. If the optional timezone offset is present in `string`, it is parsed but ignored. The behavior is undefined unless `0 <= length`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/FixUtil/parse-0e.adoc[parse]( xref:BloombergLP/bdlt/Date.adoc[Date]* result, char const* string, int length); ---- [.small]#xref:BloombergLP/bdlt/FixUtil/parse-0e.adoc[_» more..._]# Parse the specified initial `length` characters of the specified FIX `string` as a `DateTz` value, and load the value into the specified `result`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` YYYYMMDD{(+|‐)hh{:mm}|Z} ` _Exactly_ `length` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `length` characters do not. If the optional timezone offset is not present in `string`, UTC is assumed. The behavior is undefined unless `0 <= length`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/FixUtil/parse-0d3.adoc[parse]( xref:BloombergLP/bdlt/DateTz.adoc[DateTz]* result, char const* string, int length); ---- [.small]#xref:BloombergLP/bdlt/FixUtil/parse-0d3.adoc[_» more..._]# Parse the specified initial `length` characters of the specified FIX `string` as a `Datetime` value, and load the value into the specified `result`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` YYYYMMDD‐hh:mm{:ss{.s+}}{(+|‐)hh{:mm}|Z} ` _Exactly_ `length` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `length` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional timezone offset is present in `string`, the resulting `Datetime` value is converted to the equivalent UTC value; if the timezone offset is absent, UTC is assumed. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. The behavior is undefined unless `0 <= length`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/FixUtil/parse-0db.adoc[parse]( xref:BloombergLP/bdlt/Datetime.adoc[Datetime]* result, char const* string, int length); ---- [.small]#xref:BloombergLP/bdlt/FixUtil/parse-0db.adoc[_» more..._]# Parse the specified initial `length` characters of the specified FIX `string` as a `DatetimeTz` value, and load the value into the specified `result`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` YYYYMMDD‐hh:mm{:ss{.s+}}{(+|‐)hh{:mm}|Z} ` _Exactly_ `length` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `length` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional timezone offset is not present in `string`, UTC is assumed. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. The behavior is undefined unless `0 <= length`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/FixUtil/parse-04b.adoc[parse]( xref:BloombergLP/bdlt/DatetimeTz.adoc[DatetimeTz]* result, char const* string, int length); ---- [.small]#xref:BloombergLP/bdlt/FixUtil/parse-04b.adoc[_» more..._]# Parse the specified initial `length` characters of the specified FIX `string` as a `Time` value, and load the value into the specified `result`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` hh:mm:ss{.s+}{(+|‐)hh{:mm}|Z} ` _Exactly_ `length` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `length` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional timezone offset is present in `string`, the resulting `Time` value is converted to the equivalent UTC time; if the timezone offset is absent, UTC is assumed. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. The behavior is undefined unless `0 <= length`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/FixUtil/parse-043.adoc[parse]( xref:BloombergLP/bdlt/Time.adoc[Time]* result, char const* string, int length); ---- [.small]#xref:BloombergLP/bdlt/FixUtil/parse-043.adoc[_» more..._]# Parse the specified initial `length` characters of the specified FIX `string` as a `TimeTz` value, and load the value into the specified `result`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` hh:mm{:ss{.s+}}{(+|‐)hh{:mm}|Z} ` _Exactly_ `length` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `length` characters do not. If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds. If the optional timezone offset is not present in `string`, UTC is assumed. If a leap second is detected (i.e., the parsed value of the `second` attribute is 60; see {Leap Seconds}), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end. The behavior is undefined unless `0 <= length`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/FixUtil/parse-0b.adoc[parse]( xref:BloombergLP/bdlt/TimeTz.adoc[TimeTz]* result, char const* string, int length); ---- [.small]#xref:BloombergLP/bdlt/FixUtil/parse-0b.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#