8#ifndef INCLUDED_BDLT_ISO8601UTIL
9#define INCLUDED_BDLT_ISO8601UTIL
663#include <bdlscm_version.h>
684#include <bsl_cstddef.h>
685#include <bsl_ostream.h>
686#include <bsl_string.h>
697#define BDLT_ISO8601UTIL_DEPRECATE_GENERATE \
698 BSLS_DEPRECATE_FEATURE("bdl", \
700 "use overload with GenerateConfiguration")
702#define BDLT_ISO8601UTIL_DEPRECATE_GENERATE_ORDER \
703 BSLS_DEPRECATE_FEATURE("bdl", \
705 "use overload with length before object")
707#define BDLT_ISO8601UTIL_DEPRECATE_GENERATERAW \
708 BSLS_DEPRECATE_FEATURE("bdl", \
710 "use overload with GenerateConfiguration")
712#define BDLT_ISO8601UTIL_DEPRECATE_PARSERELAXED \
713 BSLS_DEPRECATE_FEATURE("bdl", \
715 "use parse with ParseConfiguration")
763#ifndef BDE_OMIT_INTERNAL_DEPRECATED
927 static int generate(std::string *
string,
932 static int generate(std::string *
string,
937 static int generate(std::string *
string,
942 static int generate(std::string *
string,
947 static int generate(std::string *
string,
952 static int generate(std::string *
string,
957 static int generate(std::string *
string,
962 static int generate(std::string *
string,
967 static int generate(std::string *
string,
972 static int generate(std::string *
string,
990#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR_STRING
991 static int generate(std::pmr::string *
string,
993 static int generate(std::pmr::string *
string,
996 static int generate(std::pmr::string *
string,
998 static int generate(std::pmr::string *
string,
1001 static int generate(std::pmr::string *
string,
1002 const Time&
object);
1003 static int generate(std::pmr::string *
string,
1006 static int generate(std::pmr::string *
string,
1008 static int generate(std::pmr::string *
string,
1011 static int generate(std::pmr::string *
string,
1013 static int generate(std::pmr::string *
string,
1016 static int generate(std::pmr::string *
string,
1018 static int generate(std::pmr::string *
string,
1021 static int generate(std::pmr::string *
string,
1023 static int generate(std::pmr::string *
string,
1026 static int generate(std::pmr::string *
string,
1028 static int generate(std::pmr::string *
string,
1031 static int generate(std::pmr::string *
string,
1033 static int generate(std::pmr::string *
string,
1036 static int generate(std::pmr::string *
string,
1046 static int generate(std::pmr::string *
string,
1058 bsl::ostream& stream,
1061 bsl::ostream& stream,
1065 bsl::ostream& stream,
1066 const Date&
object);
1068 bsl::ostream& stream,
1072 bsl::ostream& stream,
1073 const Time&
object);
1075 bsl::ostream& stream,
1079 bsl::ostream& stream,
1082 bsl::ostream& stream,
1086 bsl::ostream& stream,
1089 bsl::ostream& stream,
1093 bsl::ostream& stream,
1096 bsl::ostream& stream,
1100 bsl::ostream& stream,
1103 bsl::ostream& stream,
1107 bsl::ostream& stream,
1110 bsl::ostream& stream,
1114 bsl::ostream& stream,
1117 bsl::ostream& stream,
1121 bsl::ostream& stream,
1124 bsl::ostream& stream,
1134 const Date&
object);
1139 const Time&
object);
1680#ifndef BDE_OMIT_INTERNAL_DEPRECATED
1901 bool useZAbbreviationForUtc);
1908 bool useZAbbreviationForUtc);
1915 bool useZAbbreviationForUtc);
1918 static bsl::ostream&
generate(bsl::ostream& stream,
1920 bool useZAbbreviationForUtc);
1922 static bsl::ostream&
generate(bsl::ostream& stream,
1924 bool useZAbbreviationForUtc);
1928 static bsl::ostream&
generate(bsl::ostream& stream,
1930 bool useZAbbreviationForUtc);
1935 bool useZAbbreviationForUtc);
1939 bool useZAbbreviationForUtc);
1945 bool useZAbbreviationForUtc);
1977 defaultConfiguration());
1991 defaultConfiguration());
2005 defaultConfiguration());
2020 defaultConfiguration());
2034 defaultConfiguration());
2048 defaultConfiguration());
2063 defaultConfiguration());
2077 defaultConfiguration());
2091 defaultConfiguration());
2105 defaultConfiguration());
2112 return generate(
string,
object, defaultConfiguration());
2118 return generate(
string,
object, defaultConfiguration());
2124 return generate(
string,
object, defaultConfiguration());
2130 return generate(
string,
object, defaultConfiguration());
2136 return generate(
string,
object, defaultConfiguration());
2142 return generate(
string,
object, defaultConfiguration());
2148 return generate(
string,
object, defaultConfiguration());
2154 return generate(
string,
object, defaultConfiguration());
2160 return generate(
string,
object, defaultConfiguration());
2167 return generate(
string,
object, defaultConfiguration());
2174 return generate(
string,
object, defaultConfiguration());
2180 return generate(
string,
object, defaultConfiguration());
2186 return generate(
string,
object, defaultConfiguration());
2192 return generate(
string,
object, defaultConfiguration());
2198 return generate(
string,
object, defaultConfiguration());
2204 return generate(
string,
object, defaultConfiguration());
2210 return generate(
string,
object, defaultConfiguration());
2216 return generate(
string,
object, defaultConfiguration());
2222 return generate(
string,
object, defaultConfiguration());
2229 return generate(
string,
object, defaultConfiguration());
2232#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR_STRING
2237 return generate(
string,
object, defaultConfiguration());
2243 return generate(
string,
object, defaultConfiguration());
2249 return generate(
string,
object, defaultConfiguration());
2255 return generate(
string,
object, defaultConfiguration());
2261 return generate(
string,
object, defaultConfiguration());
2267 return generate(
string,
object, defaultConfiguration());
2273 return generate(
string,
object, defaultConfiguration());
2279 return generate(
string,
object, defaultConfiguration());
2285 return generate(
string,
object, defaultConfiguration());
2290 const DatetimeOrDatetimeTz&
object)
2292 return generate(
string,
object, defaultConfiguration());
2302 defaultConfiguration());
2307 bsl::ostream& stream,
2319 return stream.write(buffer, len);
2327 defaultConfiguration());
2332 bsl::ostream& stream,
2341 return stream.write(buffer, len);
2349 defaultConfiguration());
2354 bsl::ostream& stream,
2363 return stream.write(buffer, len);
2372 defaultConfiguration());
2377 bsl::ostream& stream,
2386 return stream.write(buffer, len);
2394 defaultConfiguration());
2399 bsl::ostream& stream,
2408 return stream.write(buffer, len);
2416 defaultConfiguration());
2421 bsl::ostream& stream,
2430 return stream.write(buffer, len);
2439 defaultConfiguration());
2444 bsl::ostream& stream,
2456 return stream.write(buffer, len);
2465 defaultConfiguration());
2470 bsl::ostream& stream,
2482 return stream.write(buffer, len);
2491 defaultConfiguration());
2496 bsl::ostream& stream,
2508 return stream.write(buffer, len);
2517 defaultConfiguration());
2522 bsl::ostream& stream,
2534 return stream.write(buffer, len);
2544 defaultConfiguration());
2554 defaultConfiguration());
2564 defaultConfiguration());
2574 defaultConfiguration());
2584 defaultConfiguration());
2594 defaultConfiguration());
2604 defaultConfiguration());
2614 defaultConfiguration());
2624 defaultConfiguration());
2634 defaultConfiguration());
2643 return parse(result,
string.data(),
string.length());
2653 return parse(result,
string.data(),
string.length(), configuration);
2663 return parse(result,
string.data(),
string.length(), configuration);
2673 return parse(result,
string.data(),
string.length(), configuration);
2683 return parse(result,
string.data(),
string.length(), configuration);
2693 return parse(result,
string.data(),
string.length(), configuration);
2703 return parse(result,
string.data(),
string.length(), configuration);
2713 return parse(result,
string.data(),
string.length(), configuration);
2723 return parse(result,
string.data(),
string.length(), configuration);
2733 return parse(result,
string.data(),
string.length(), configuration);
2736#ifndef BDE_OMIT_INTERNAL_DEPRECATED
2775 return generate(buffer, bufferLength,
object);
2783 return generate(buffer, bufferLength,
object);
2791 return generate(buffer, bufferLength,
object);
2799 return generate(buffer, bufferLength,
object);
2807 return generate(buffer, bufferLength,
object);
2815 return generate(buffer, bufferLength,
object);
2822 bool useZAbbreviationForUtc)
2827 return generate(buffer, bufferLength,
object, configuration);
2834 bool useZAbbreviationForUtc)
2839 return generate(buffer, bufferLength,
object, configuration);
2846 bool useZAbbreviationForUtc)
2851 return generate(buffer, bufferLength,
object, configuration);
2857 bool useZAbbreviationForUtc)
2862 return generate(stream,
object, configuration);
2868 bool useZAbbreviationForUtc)
2873 return generate(stream,
object, configuration);
2879 bool useZAbbreviationForUtc)
2884 return generate(stream,
object, configuration);
2890 bool useZAbbreviationForUtc)
2895 return generateRaw(buffer,
object, configuration);
2901 bool useZAbbreviationForUtc)
2906 return generateRaw(buffer,
object, configuration);
2912 bool useZAbbreviationForUtc)
2917 return generateRaw(buffer,
object, configuration);
Definition bdlb_variant.h:2514
Definition bdlt_datetz.h:162
Definition bdlt_date.h:294
Definition bdlt_datetimetz.h:308
Definition bdlt_datetime.h:331
Definition bdlt_iso8601utilconfiguration.h:225
void setUseZAbbreviationForUtc(bool value)
static Iso8601UtilConfiguration defaultConfiguration()
Definition bdlt_iso8601utilconfiguration.h:407
Definition bdlt_iso8601utilparseconfiguration.h:158
Definition bdlt_timetz.h:190
Definition bdlt_time.h:196
Definition bslstl_stringview.h:441
Definition bslstl_string.h:1281
Definition bsls_timeinterval.h:301
#define BDLT_ISO8601UTIL_DEPRECATE_GENERATE
Definition bdlt_iso8601util.h:697
#define BDLT_ISO8601UTIL_DEPRECATE_GENERATERAW
Definition bdlt_iso8601util.h:707
#define BDLT_ISO8601UTIL_DEPRECATE_PARSERELAXED
Definition bdlt_iso8601util.h:712
#define BDLT_ISO8601UTIL_DEPRECATE_GENERATE_ORDER
Definition bdlt_iso8601util.h:702
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1762
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bbldc_basicisma30360.h:112
Definition bdlt_iso8601util.h:691
Definition bdlt_iso8601util.h:732
static int generate(std::string *string, const Date &object, const GenerateConfiguration &configuration)
static int generateRaw(char *buffer, const TimeOrTimeTz &object, const GenerateConfiguration &configuration)
static int generate(bsl::string *string, const DateTz &object, const GenerateConfiguration &configuration)
static BDLT_ISO8601UTIL_DEPRECATE_PARSERELAXED int parseRelaxed(DatetimeOrDatetimeTz *result, const char *string, ssize_t length)
static int generate(std::string *string, const DatetimeTz &object, const GenerateConfiguration &configuration)
Iso8601UtilConfiguration Configuration
Definition bdlt_iso8601util.h:784
static int generateRaw(char *buffer, const Time &object, const GenerateConfiguration &configuration)
static int parse(DatetimeTz *result, const char *string, ssize_t length, ParseConfiguration configuration=ParseConfiguration())
static int generate(bsl::string *string, const DatetimeTz &object, const GenerateConfiguration &configuration)
static int generate(char *buffer, ssize_t bufferLength, const DatetimeOrDatetimeTz &object, const GenerateConfiguration &configuration)
static int parse(Time *result, const char *string, ssize_t length, ParseConfiguration configuration=ParseConfiguration())
static int parse(Date *result, const char *string, ssize_t length, ParseConfiguration configuration=ParseConfiguration())
static int parse(Datetime *result, const char *string, ssize_t length, ParseConfiguration configuration=ParseConfiguration())
static int generateRaw(char *buffer, const DatetimeOrDatetimeTz &object, const GenerateConfiguration &configuration)
Iso8601UtilParseConfiguration ParseConfiguration
Configuration for string parsing.
Definition bdlt_iso8601util.h:790
static int generate(char *buffer, ssize_t bufferLength, const Datetime &object, const GenerateConfiguration &configuration)
@ BDEPU_DATETIME_STRLEN
Definition bdlt_iso8601util.h:765
@ k_DATETZ_STRLEN
Definition bdlt_iso8601util.h:751
@ k_DATE_STRLEN
Definition bdlt_iso8601util.h:750
@ BDEPU_MAX_DATETIME_STRLEN
Definition bdlt_iso8601util.h:770
@ k_TIME_STRLEN
Definition bdlt_iso8601util.h:753
@ TIMETZ_STRLEN
Definition bdlt_iso8601util.h:777
@ BDEPU_DATETIMETZ_STRLEN
Definition bdlt_iso8601util.h:766
@ DATETIMETZ_STRLEN
Definition bdlt_iso8601util.h:774
@ DATETZ_STRLEN
Definition bdlt_iso8601util.h:775
@ k_DATETIMETZ_STRLEN
Definition bdlt_iso8601util.h:757
@ k_TIMEINTERVAL_STRLEN
Definition bdlt_iso8601util.h:759
@ BDEPU_TIMETZ_STRLEN
Definition bdlt_iso8601util.h:769
@ k_MAX_STRLEN
Definition bdlt_iso8601util.h:761
@ BDEPU_DATE_STRLEN
Definition bdlt_iso8601util.h:764
@ DATE_STRLEN
Definition bdlt_iso8601util.h:772
@ MAX_DATETIME_STRLEN
Definition bdlt_iso8601util.h:778
@ TIME_STRLEN
Definition bdlt_iso8601util.h:776
@ BDEPU_TIME_STRLEN
Definition bdlt_iso8601util.h:768
@ k_TIMETZ_STRLEN
Definition bdlt_iso8601util.h:754
@ DATETIME_STRLEN
Definition bdlt_iso8601util.h:773
@ BDEPU_DATETZ_STRLEN
Definition bdlt_iso8601util.h:767
@ k_DATETIME_STRLEN
Definition bdlt_iso8601util.h:756
static int generate(char *buffer, ssize_t bufferLength, const Date &object, const GenerateConfiguration &configuration)
static int generate(std::string *string, const Datetime &object, const GenerateConfiguration &configuration)
static int generate(bsl::string *string, const bsls::TimeInterval &object, const GenerateConfiguration &configuration)
static int generate(bsl::string *string, const DateOrDateTz &object, const GenerateConfiguration &configuration)
static int generate(bsl::string *string, const TimeOrTimeTz &object, const GenerateConfiguration &configuration)
bdlb::Variant2< Time, TimeTz > TimeOrTimeTz
Definition bdlt_iso8601util.h:798
static int generate(char *buffer, ssize_t bufferLength, const Time &object, const GenerateConfiguration &configuration)
static int generate(char *buffer, ssize_t bufferLength, const DateOrDateTz &object, const GenerateConfiguration &configuration)
static int generate(bsl::string *string, const Datetime &object, const GenerateConfiguration &configuration)
static int generate(std::string *string, const TimeOrTimeTz &object, const GenerateConfiguration &configuration)
bsl::ptrdiff_t ssize_t
Definition bdlt_iso8601util.h:782
Iso8601UtilConfiguration GenerateConfiguration
Configuration for string generation.
Definition bdlt_iso8601util.h:787
static int generateRaw(char *buffer, const bsls::TimeInterval &object)
Definition bdlt_iso8601util.h:2538
static int generate(std::string *string, const bsls::TimeInterval &object, const GenerateConfiguration &configuration)
static int parse(TimeTz *result, const char *string, ssize_t length, ParseConfiguration configuration=ParseConfiguration())
static int generate(bsl::string *string, const DatetimeOrDatetimeTz &object, const GenerateConfiguration &configuration)
bdlb::Variant2< Datetime, DatetimeTz > DatetimeOrDatetimeTz
Definition bdlt_iso8601util.h:802
static int parse(DateTz *result, const char *string, ssize_t length, ParseConfiguration configuration=ParseConfiguration())
static int generate(std::string *string, const TimeTz &object, const GenerateConfiguration &configuration)
static int generate(char *buffer, ssize_t bufferLength, const DatetimeTz &object, const GenerateConfiguration &configuration)
static int generateRaw(char *buffer, const TimeTz &object, const GenerateConfiguration &configuration)
static int generate(std::string *string, const DatetimeOrDatetimeTz &object, const GenerateConfiguration &configuration)
static int generate(std::string *string, const DateTz &object, const GenerateConfiguration &configuration)
static int generateRaw(char *buffer, const bsls::TimeInterval &object, const GenerateConfiguration &configuration)
static BDLT_ISO8601UTIL_DEPRECATE_PARSERELAXED int parseRelaxed(Datetime *result, const char *string, ssize_t length)
static int generate(char *buffer, ssize_t bufferLength, const TimeOrTimeTz &object, const GenerateConfiguration &configuration)
static BDLT_ISO8601UTIL_DEPRECATE_PARSERELAXED int parseRelaxed(DatetimeTz *result, const char *string, ssize_t length)
static int generate(char *buffer, ssize_t bufferLength, const TimeTz &object, const GenerateConfiguration &configuration)
static int generateRaw(char *buffer, const Date &object, const GenerateConfiguration &configuration)
static int generate(char *buffer, ssize_t bufferLength, const DateTz &object, const GenerateConfiguration &configuration)
static int generate(std::string *string, const Time &object, const GenerateConfiguration &configuration)
static int parse(TimeOrTimeTz *result, const char *string, ssize_t length, ParseConfiguration configuration=ParseConfiguration())
bdlb::Variant2< Date, DateTz > DateOrDateTz
Definition bdlt_iso8601util.h:794
static int generateRaw(char *buffer, const DateOrDateTz &object, const GenerateConfiguration &configuration)
static int generateRaw(char *buffer, const DatetimeTz &object, const GenerateConfiguration &configuration)
static int generate(bsl::string *string, const Time &object, const GenerateConfiguration &configuration)
static int generateRaw(char *buffer, const DateTz &object, const GenerateConfiguration &configuration)
static int generate(bsl::string *string, const Date &object, const GenerateConfiguration &configuration)
static int parse(DateOrDateTz *result, const char *string, ssize_t length, ParseConfiguration configuration=ParseConfiguration())
static int generateRaw(char *buffer, const Datetime &object, const GenerateConfiguration &configuration)
static int generate(bsl::string *string, const TimeTz &object, const GenerateConfiguration &configuration)
static int parse(bsls::TimeInterval *result, const char *string, ssize_t length)
static int generate(char *buffer, ssize_t bufferLength, const bsls::TimeInterval &object, const GenerateConfiguration &configuration)
static int generate(char *buffer, ssize_t bufferLength, const bsls::TimeInterval &object)
Definition bdlt_iso8601util.h:1967
static int parse(DatetimeOrDatetimeTz *result, const char *string, ssize_t length, ParseConfiguration configuration=ParseConfiguration())
static int generate(std::string *string, const DateOrDateTz &object, const GenerateConfiguration &configuration)