BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bdlt::Iso8601Util Struct Reference

#include <bdlt_iso8601util.h>

Detailed Description

This struct provides a namespace for a suite of pure functions that perform conversions between objects of bdlt vocabulary type and their ISO 8601 representations. Each generate and generateRaw method takes a bdlt object (of type Date, DateTz, Time, TimeTz, Datetime, or DatetimeTz) and outputs its corresponding ISO 8601 representation to a user-supplied character buffer or bsl::ostream. The parse methods effect the opposite conversion in that they populate a bdlt object from the result of parsing an ISO 8601 representation.

See bdlt_iso8601util

Public Types

enum  {
  k_DATE_STRLEN = 10 , k_DATETZ_STRLEN = 16 , k_TIME_STRLEN = 15 , k_TIMETZ_STRLEN = 21 ,
  k_DATETIME_STRLEN = 26 , k_DATETIMETZ_STRLEN = 32 , k_TIMEINTERVAL_STRLEN = 38 , k_MAX_STRLEN = k_TIMEINTERVAL_STRLEN ,
  BDEPU_DATE_STRLEN = k_DATE_STRLEN , BDEPU_DATETIME_STRLEN = k_DATETIME_STRLEN , BDEPU_DATETIMETZ_STRLEN = k_DATETIMETZ_STRLEN , BDEPU_DATETZ_STRLEN = k_DATETZ_STRLEN ,
  BDEPU_TIME_STRLEN = k_TIME_STRLEN , BDEPU_TIMETZ_STRLEN = k_TIMETZ_STRLEN , BDEPU_MAX_DATETIME_STRLEN = k_MAX_STRLEN , DATE_STRLEN = k_DATE_STRLEN ,
  DATETIME_STRLEN = k_DATETIME_STRLEN , DATETIMETZ_STRLEN = k_DATETIMETZ_STRLEN , DATETZ_STRLEN = k_DATETZ_STRLEN , TIME_STRLEN = k_TIME_STRLEN ,
  TIMETZ_STRLEN = k_TIMETZ_STRLEN , MAX_DATETIME_STRLEN = k_MAX_STRLEN
}
 
typedef bsl::ptrdiff_t ssize_t
 
typedef Iso8601UtilConfiguration Configuration
 
typedef Iso8601UtilConfiguration GenerateConfiguration
 
typedef Iso8601UtilParseConfiguration ParseConfiguration
 
typedef bdlb::Variant2< Date, DateTz > DateOrDateTz
 
typedef bdlb::Variant2< Time, TimeTz > TimeOrTimeTz
 
typedef bdlb::Variant2< Datetime, DatetimeTz > DatetimeOrDatetimeTz
 

Static Public Member Functions

static int generate (char *buffer, ssize_t bufferLength, const bsls::TimeInterval &object)
 
static int generate (char *buffer, ssize_t bufferLength, const bsls::TimeInterval &object, const GenerateConfiguration &configuration)
 
static int generate (char *buffer, ssize_t bufferLength, const Date &object)
 
static int generate (char *buffer, ssize_t bufferLength, const Date &object, const GenerateConfiguration &configuration)
 
static int generate (char *buffer, ssize_t bufferLength, const Time &object)
 
static int generate (char *buffer, ssize_t bufferLength, const Time &object, const GenerateConfiguration &configuration)
 
static int generate (char *buffer, ssize_t bufferLength, const Datetime &object)
 
static int generate (char *buffer, ssize_t bufferLength, const Datetime &object, const GenerateConfiguration &configuration)
 
static int generate (char *buffer, ssize_t bufferLength, const DateTz &object)
 
static int generate (char *buffer, ssize_t bufferLength, const DateTz &object, const GenerateConfiguration &configuration)
 
static int generate (char *buffer, ssize_t bufferLength, const TimeTz &object)
 
static int generate (char *buffer, ssize_t bufferLength, const TimeTz &object, const GenerateConfiguration &configuration)
 
static int generate (char *buffer, ssize_t bufferLength, const DatetimeTz &object)
 
static int generate (char *buffer, ssize_t bufferLength, const DatetimeTz &object, const GenerateConfiguration &configuration)
 
static int generate (char *buffer, ssize_t bufferLength, const DateOrDateTz &object)
 
static int generate (char *buffer, ssize_t bufferLength, const DateOrDateTz &object, const GenerateConfiguration &configuration)
 
static int generate (char *buffer, ssize_t bufferLength, const TimeOrTimeTz &object)
 
static int generate (char *buffer, ssize_t bufferLength, const TimeOrTimeTz &object, const GenerateConfiguration &configuration)
 
static int generate (char *buffer, ssize_t bufferLength, const DatetimeOrDatetimeTz &object)
 
static int generate (char *buffer, ssize_t bufferLength, const DatetimeOrDatetimeTz &object, const GenerateConfiguration &configuration)
 
static int generate (bsl::string *string, const bsls::TimeInterval &object)
 
static int generate (bsl::string *string, const bsls::TimeInterval &object, const GenerateConfiguration &configuration)
 
static int generate (bsl::string *string, const Date &object)
 
static int generate (bsl::string *string, const Date &object, const GenerateConfiguration &configuration)
 
static int generate (bsl::string *string, const Time &object)
 
static int generate (bsl::string *string, const Time &object, const GenerateConfiguration &configuration)
 
static int generate (bsl::string *string, const Datetime &object)
 
static int generate (bsl::string *string, const Datetime &object, const GenerateConfiguration &configuration)
 
static int generate (bsl::string *string, const DateTz &object)
 
static int generate (bsl::string *string, const DateTz &object, const GenerateConfiguration &configuration)
 
static int generate (bsl::string *string, const TimeTz &object)
 
static int generate (bsl::string *string, const TimeTz &object, const GenerateConfiguration &configuration)
 
static int generate (bsl::string *string, const DatetimeTz &object)
 
static int generate (bsl::string *string, const DatetimeTz &object, const GenerateConfiguration &configuration)
 
static int generate (bsl::string *string, const DateOrDateTz &object)
 
static int generate (bsl::string *string, const DateOrDateTz &object, const GenerateConfiguration &configuration)
 
static int generate (bsl::string *string, const TimeOrTimeTz &object)
 
static int generate (bsl::string *string, const TimeOrTimeTz &object, const GenerateConfiguration &configuration)
 
static int generate (bsl::string *string, const DatetimeOrDatetimeTz &object)
 
static int generate (bsl::string *string, const DatetimeOrDatetimeTz &object, const GenerateConfiguration &configuration)
 
static int generate (std::string *string, const bsls::TimeInterval &object)
 
static int generate (std::string *string, const bsls::TimeInterval &object, const GenerateConfiguration &configuration)
 
static int generate (std::string *string, const Date &object)
 
static int generate (std::string *string, const Date &object, const GenerateConfiguration &configuration)
 
static int generate (std::string *string, const Time &object)
 
static int generate (std::string *string, const Time &object, const GenerateConfiguration &configuration)
 
static int generate (std::string *string, const Datetime &object)
 
static int generate (std::string *string, const Datetime &object, const GenerateConfiguration &configuration)
 
static int generate (std::string *string, const DateTz &object)
 
static int generate (std::string *string, const DateTz &object, const GenerateConfiguration &configuration)
 
static int generate (std::string *string, const TimeTz &object)
 
static int generate (std::string *string, const TimeTz &object, const GenerateConfiguration &configuration)
 
static int generate (std::string *string, const DatetimeTz &object)
 
static int generate (std::string *string, const DatetimeTz &object, const GenerateConfiguration &configuration)
 
static int generate (std::string *string, const DateOrDateTz &object)
 
static int generate (std::string *string, const DateOrDateTz &object, const GenerateConfiguration &configuration)
 
static int generate (std::string *string, const TimeOrTimeTz &object)
 
static int generate (std::string *string, const TimeOrTimeTz &object, const GenerateConfiguration &configuration)
 
static int generate (std::string *string, const DatetimeOrDatetimeTz &object)
 
static int generate (std::string *string, const DatetimeOrDatetimeTz &object, const GenerateConfiguration &configuration)
 
static bsl::ostream & generate (bsl::ostream &stream, const bsls::TimeInterval &object)
 
static bsl::ostream & generate (bsl::ostream &stream, const bsls::TimeInterval &object, const GenerateConfiguration &configuration)
 
static bsl::ostream & generate (bsl::ostream &stream, const Date &object)
 
static bsl::ostream & generate (bsl::ostream &stream, const Date &object, const GenerateConfiguration &configuration)
 
static bsl::ostream & generate (bsl::ostream &stream, const Time &object)
 
static bsl::ostream & generate (bsl::ostream &stream, const Time &object, const GenerateConfiguration &configuration)
 
static bsl::ostream & generate (bsl::ostream &stream, const Datetime &object)
 
static bsl::ostream & generate (bsl::ostream &stream, const Datetime &object, const GenerateConfiguration &configuration)
 
static bsl::ostream & generate (bsl::ostream &stream, const DateTz &object)
 
static bsl::ostream & generate (bsl::ostream &stream, const DateTz &object, const GenerateConfiguration &configuration)
 
static bsl::ostream & generate (bsl::ostream &stream, const TimeTz &object)
 
static bsl::ostream & generate (bsl::ostream &stream, const TimeTz &object, const GenerateConfiguration &configuration)
 
static bsl::ostream & generate (bsl::ostream &stream, const DatetimeTz &object)
 
static bsl::ostream & generate (bsl::ostream &stream, const DatetimeTz &object, const GenerateConfiguration &configuration)
 
static bsl::ostream & generate (bsl::ostream &stream, const DateOrDateTz &object)
 
static bsl::ostream & generate (bsl::ostream &stream, const DateOrDateTz &object, const GenerateConfiguration &configuration)
 
static bsl::ostream & generate (bsl::ostream &stream, const TimeOrTimeTz &object)
 
static bsl::ostream & generate (bsl::ostream &stream, const TimeOrTimeTz &object, const GenerateConfiguration &configuration)
 
static bsl::ostream & generate (bsl::ostream &stream, const DatetimeOrDatetimeTz &object)
 
static bsl::ostream & generate (bsl::ostream &stream, const DatetimeOrDatetimeTz &object, const GenerateConfiguration &configuration)
 
static int generateRaw (char *buffer, const bsls::TimeInterval &object)
 
static int generateRaw (char *buffer, const bsls::TimeInterval &object, const GenerateConfiguration &configuration)
 
static int generateRaw (char *buffer, const Date &object)
 
static int generateRaw (char *buffer, const Date &object, const GenerateConfiguration &configuration)
 
static int generateRaw (char *buffer, const Time &object)
 
static int generateRaw (char *buffer, const Time &object, const GenerateConfiguration &configuration)
 
static int generateRaw (char *buffer, const Datetime &object)
 
static int generateRaw (char *buffer, const Datetime &object, const GenerateConfiguration &configuration)
 
static int generateRaw (char *buffer, const DateTz &object)
 
static int generateRaw (char *buffer, const DateTz &object, const GenerateConfiguration &configuration)
 
static int generateRaw (char *buffer, const TimeTz &object)
 
static int generateRaw (char *buffer, const TimeTz &object, const GenerateConfiguration &configuration)
 
static int generateRaw (char *buffer, const DatetimeTz &object)
 
static int generateRaw (char *buffer, const DatetimeTz &object, const GenerateConfiguration &configuration)
 
static int generateRaw (char *buffer, const DateOrDateTz &object)
 
static int generateRaw (char *buffer, const DateOrDateTz &object, const GenerateConfiguration &configuration)
 
static int generateRaw (char *buffer, const TimeOrTimeTz &object)
 
static int generateRaw (char *buffer, const TimeOrTimeTz &object, const GenerateConfiguration &configuration)
 
static int generateRaw (char *buffer, const DatetimeOrDatetimeTz &object)
 
static int generateRaw (char *buffer, const DatetimeOrDatetimeTz &object, const GenerateConfiguration &configuration)
 
static int parse (bsls::TimeInterval *result, const char *string, ssize_t length)
 
static int parse (Date *result, const char *string, ssize_t length, ParseConfiguration configuration=ParseConfiguration())
 
static int parse (Time *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 parse (DateTz *result, const char *string, ssize_t length, ParseConfiguration configuration=ParseConfiguration())
 
static int parse (TimeTz *result, const char *string, ssize_t length, ParseConfiguration configuration=ParseConfiguration())
 
static int parse (DatetimeTz *result, const char *string, ssize_t length, ParseConfiguration configuration=ParseConfiguration())
 
static int parse (DateOrDateTz *result, const char *string, ssize_t length, ParseConfiguration configuration=ParseConfiguration())
 
static int parse (TimeOrTimeTz *result, const char *string, ssize_t length, ParseConfiguration configuration=ParseConfiguration())
 
static int parse (DatetimeOrDatetimeTz *result, const char *string, ssize_t length, ParseConfiguration configuration=ParseConfiguration())
 
static int parse (bsls::TimeInterval *result, const bsl::string_view &string)
 
static int parse (Date *result, const bsl::string_view &string, ParseConfiguration configuration=ParseConfiguration())
 
static int parse (Time *result, const bsl::string_view &string, ParseConfiguration configuration=ParseConfiguration())
 
static int parse (Datetime *result, const bsl::string_view &string, ParseConfiguration configuration=ParseConfiguration())
 
static int parse (DateTz *result, const bsl::string_view &string, ParseConfiguration configuration=ParseConfiguration())
 
static int parse (TimeTz *result, const bsl::string_view &string, ParseConfiguration configuration=ParseConfiguration())
 
static int parse (DatetimeTz *result, const bsl::string_view &string, ParseConfiguration configuration=ParseConfiguration())
 
static int parse (DateOrDateTz *result, const bsl::string_view &string, ParseConfiguration configuration=ParseConfiguration())
 
static int parse (TimeOrTimeTz *result, const bsl::string_view &string, ParseConfiguration configuration=ParseConfiguration())
 
static int parse (DatetimeOrDatetimeTz *result, const bsl::string_view &string, ParseConfiguration configuration=ParseConfiguration())
 
static BDLT_ISO8601UTIL_DEPRECATE_PARSERELAXED int parseRelaxed (Datetime *result, const char *string, ssize_t length)
 
static BDLT_ISO8601UTIL_DEPRECATE_PARSERELAXED int parseRelaxed (DatetimeTz *result, const char *string, ssize_t length)
 
static BDLT_ISO8601UTIL_DEPRECATE_PARSERELAXED int parseRelaxed (DatetimeOrDatetimeTz *result, const char *string, ssize_t length)
 
static BDLT_ISO8601UTIL_DEPRECATE_PARSERELAXED int parseRelaxed (Datetime *result, const bsl::string_view &string)
 
static BDLT_ISO8601UTIL_DEPRECATE_PARSERELAXED int parseRelaxed (DatetimeTz *result, const bsl::string_view &string)
 
static BDLT_ISO8601UTIL_DEPRECATE_PARSERELAXED int parseRelaxed (DatetimeOrDatetimeTz *result, const bsl::string_view &string)
 
static BDLT_ISO8601UTIL_DEPRECATE_GENERATE_ORDER int generate (char *buffer, const Date &object, ssize_t bufferLength)
 
static BDLT_ISO8601UTIL_DEPRECATE_GENERATE_ORDER int generate (char *buffer, const Time &object, ssize_t bufferLength)
 
static BDLT_ISO8601UTIL_DEPRECATE_GENERATE_ORDER int generate (char *buffer, const Datetime &object, ssize_t bufferLength)
 
static BDLT_ISO8601UTIL_DEPRECATE_GENERATE_ORDER int generate (char *buffer, const DateTz &object, ssize_t bufferLength)
 
static BDLT_ISO8601UTIL_DEPRECATE_GENERATE_ORDER int generate (char *buffer, const TimeTz &object, ssize_t bufferLength)
 
static BDLT_ISO8601UTIL_DEPRECATE_GENERATE_ORDER int generate (char *buffer, const DatetimeTz &object, ssize_t bufferLength)
 
static BDLT_ISO8601UTIL_DEPRECATE_GENERATE int generate (char *buffer, const DateTz &object, ssize_t bufferLength, bool useZAbbreviationForUtc)
 
static BDLT_ISO8601UTIL_DEPRECATE_GENERATE int generate (char *buffer, const TimeTz &object, ssize_t bufferLength, bool useZAbbreviationForUtc)
 
static BDLT_ISO8601UTIL_DEPRECATE_GENERATE int generate (char *buffer, const DatetimeTz &object, ssize_t bufferLength, bool useZAbbreviationForUtc)
 
static BDLT_ISO8601UTIL_DEPRECATE_GENERATE bsl::ostream & generate (bsl::ostream &stream, const DateTz &object, bool useZAbbreviationForUtc)
 
static BDLT_ISO8601UTIL_DEPRECATE_GENERATE bsl::ostream & generate (bsl::ostream &stream, const TimeTz &object, bool useZAbbreviationForUtc)
 
static BDLT_ISO8601UTIL_DEPRECATE_GENERATE bsl::ostream & generate (bsl::ostream &stream, const DatetimeTz &object, bool useZAbbreviationForUtc)
 
static BDLT_ISO8601UTIL_DEPRECATE_GENERATERAW int generateRaw (char *buffer, const DateTz &object, bool useZAbbreviationForUtc)
 
static BDLT_ISO8601UTIL_DEPRECATE_GENERATERAW int generateRaw (char *buffer, const TimeTz &object, bool useZAbbreviationForUtc)
 
static BDLT_ISO8601UTIL_DEPRECATE_GENERATERAW int generateRaw (char *buffer, const DatetimeTz &object, bool useZAbbreviationForUtc)
 

Member Typedef Documentation

◆ Configuration

◆ DateOrDateTz

DateOrDateTz is a convenient alias for bdlb::Variant2<Date, DateTz>.

◆ DatetimeOrDatetimeTz

◆ GenerateConfiguration

Configuration for string generation.

◆ ParseConfiguration

Configuration for string parsing.

◆ ssize_t

typedef bsl::ptrdiff_t bdlt::Iso8601Util::ssize_t

◆ TimeOrTimeTz

TimeOrTimeTz is a convenient alias for bdlb::Variant2<Time, TimeTz>.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
k_DATE_STRLEN 
k_DATETZ_STRLEN 
k_TIME_STRLEN 
k_TIMETZ_STRLEN 
k_DATETIME_STRLEN 
k_DATETIMETZ_STRLEN 
k_TIMEINTERVAL_STRLEN 
k_MAX_STRLEN 
BDEPU_DATE_STRLEN 
BDEPU_DATETIME_STRLEN 
BDEPU_DATETIMETZ_STRLEN 
BDEPU_DATETZ_STRLEN 
BDEPU_TIME_STRLEN 
BDEPU_TIMETZ_STRLEN 
BDEPU_MAX_DATETIME_STRLEN 
DATE_STRLEN 
DATETIME_STRLEN 
DATETIMETZ_STRLEN 
DATETZ_STRLEN 
TIME_STRLEN 
TIMETZ_STRLEN 
MAX_DATETIME_STRLEN 

Member Function Documentation

◆ generate() [1/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const bsls::TimeInterval &  object 
)
inlinestatic

Write the ISO 8601 representation of the specified object to the specified stream. Optionally specify a configuration to affect the format of the generated string. If configuration is not supplied, the process-wide default value Iso8601UtilConfiguration::defaultConfiguration() is used. Return a reference to stream.

Note
Note that stream is not null terminated.

◆ generate() [2/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const bsls::TimeInterval &  object,
const GenerateConfiguration &  configuration 
)
inlinestatic

◆ generate() [3/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const Date &  object 
)
inlinestatic

◆ generate() [4/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const Date &  object,
const GenerateConfiguration &  configuration 
)
inlinestatic

◆ generate() [5/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const DateOrDateTz &  object 
)
inlinestatic

◆ generate() [6/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const DateOrDateTz &  object,
const GenerateConfiguration &  configuration 
)
inlinestatic

◆ generate() [7/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const Datetime &  object 
)
inlinestatic

◆ generate() [8/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const Datetime &  object,
const GenerateConfiguration &  configuration 
)
inlinestatic

◆ generate() [9/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const DatetimeOrDatetimeTz &  object 
)
inlinestatic

◆ generate() [10/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const DatetimeOrDatetimeTz &  object,
const GenerateConfiguration &  configuration 
)
inlinestatic

◆ generate() [11/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const DatetimeTz &  object 
)
inlinestatic

◆ generate() [12/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const DatetimeTz &  object,
bool  useZAbbreviationForUtc 
)
inlinestatic

◆ generate() [13/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const DatetimeTz &  object,
const GenerateConfiguration &  configuration 
)
inlinestatic

◆ generate() [14/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const DateTz &  object 
)
inlinestatic

◆ generate() [15/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const DateTz &  object,
bool  useZAbbreviationForUtc 
)
inlinestatic
Deprecated:
Use the overloads taking an Iso8601UtilConfiguration object instead.

◆ generate() [16/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const DateTz &  object,
const GenerateConfiguration &  configuration 
)
inlinestatic

◆ generate() [17/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const Time &  object 
)
inlinestatic

◆ generate() [18/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const Time &  object,
const GenerateConfiguration &  configuration 
)
inlinestatic

◆ generate() [19/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const TimeOrTimeTz &  object 
)
inlinestatic

◆ generate() [20/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const TimeOrTimeTz &  object,
const GenerateConfiguration &  configuration 
)
inlinestatic

◆ generate() [21/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const TimeTz &  object 
)
inlinestatic

◆ generate() [22/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const TimeTz &  object,
bool  useZAbbreviationForUtc 
)
inlinestatic

◆ generate() [23/92]

bsl::ostream & bdlt::Iso8601Util::generate ( bsl::ostream &  stream,
const TimeTz &  object,
const GenerateConfiguration &  configuration 
)
inlinestatic

◆ generate() [24/92]

int bdlt::Iso8601Util::generate ( bsl::string *  string,
const bsls::TimeInterval &  object 
)
inlinestatic

◆ generate() [25/92]

static int bdlt::Iso8601Util::generate ( bsl::string *  string,
const bsls::TimeInterval &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [26/92]

int bdlt::Iso8601Util::generate ( bsl::string *  string,
const Date &  object 
)
inlinestatic

◆ generate() [27/92]

static int bdlt::Iso8601Util::generate ( bsl::string *  string,
const Date &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [28/92]

int bdlt::Iso8601Util::generate ( bsl::string *  string,
const DateOrDateTz &  object 
)
inlinestatic

◆ generate() [29/92]

static int bdlt::Iso8601Util::generate ( bsl::string *  string,
const DateOrDateTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [30/92]

int bdlt::Iso8601Util::generate ( bsl::string *  string,
const Datetime &  object 
)
inlinestatic

◆ generate() [31/92]

static int bdlt::Iso8601Util::generate ( bsl::string *  string,
const Datetime &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [32/92]

int bdlt::Iso8601Util::generate ( bsl::string *  string,
const DatetimeOrDatetimeTz &  object 
)
inlinestatic

◆ generate() [33/92]

static int bdlt::Iso8601Util::generate ( bsl::string *  string,
const DatetimeOrDatetimeTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [34/92]

int bdlt::Iso8601Util::generate ( bsl::string *  string,
const DatetimeTz &  object 
)
inlinestatic

◆ generate() [35/92]

static int bdlt::Iso8601Util::generate ( bsl::string *  string,
const DatetimeTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [36/92]

int bdlt::Iso8601Util::generate ( bsl::string *  string,
const DateTz &  object 
)
inlinestatic

◆ generate() [37/92]

static int bdlt::Iso8601Util::generate ( bsl::string *  string,
const DateTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [38/92]

int bdlt::Iso8601Util::generate ( bsl::string *  string,
const Time &  object 
)
inlinestatic

◆ generate() [39/92]

static int bdlt::Iso8601Util::generate ( bsl::string *  string,
const Time &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [40/92]

int bdlt::Iso8601Util::generate ( bsl::string *  string,
const TimeOrTimeTz &  object 
)
inlinestatic

◆ generate() [41/92]

static int bdlt::Iso8601Util::generate ( bsl::string *  string,
const TimeOrTimeTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [42/92]

int bdlt::Iso8601Util::generate ( bsl::string *  string,
const TimeTz &  object 
)
inlinestatic

◆ generate() [43/92]

static int bdlt::Iso8601Util::generate ( bsl::string *  string,
const TimeTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [44/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
const Date &  object,
ssize_t  bufferLength 
)
inlinestatic
Deprecated:
Use the overloads taking the bufferLength argument before the object argument instead.

◆ generate() [45/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
const Datetime &  object,
ssize_t  bufferLength 
)
inlinestatic

◆ generate() [46/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
const DatetimeTz &  object,
ssize_t  bufferLength 
)
inlinestatic

◆ generate() [47/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
const DatetimeTz &  object,
ssize_t  bufferLength,
bool  useZAbbreviationForUtc 
)
inlinestatic

◆ generate() [48/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
const DateTz &  object,
ssize_t  bufferLength 
)
inlinestatic

◆ generate() [49/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
const DateTz &  object,
ssize_t  bufferLength,
bool  useZAbbreviationForUtc 
)
inlinestatic
Deprecated:
Use the overloads taking an Iso8601UtilConfiguration object instead.

◆ generate() [50/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
const Time &  object,
ssize_t  bufferLength 
)
inlinestatic

◆ generate() [51/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
const TimeTz &  object,
ssize_t  bufferLength 
)
inlinestatic

◆ generate() [52/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
const TimeTz &  object,
ssize_t  bufferLength,
bool  useZAbbreviationForUtc 
)
inlinestatic

◆ generate() [53/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const bsls::TimeInterval &  object 
)
inlinestatic

Write the ISO 8601 representation of the specified object to the specified buffer of the specified bufferLength (in bytes), truncating (if necessary) to bufferLength. Optionally specify a configuration to affect the format of the generated string. If configuration is not supplied, the process-wide default value Iso8601UtilConfiguration::defaultConfiguration() is used. Return the number of characters in the formatted string before truncation (not counting a null terminator). If bufferLength indicates sufficient capacity, buffer is null terminated.

Precondition
The behavior is undefined unless 0 <= bufferLength.
Note
Note that a buffer of size k_MAX_STRLEN + 1 is large enough to hold any string generated by this component (counting a null terminator, if any).

◆ generate() [54/92]

static int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const bsls::TimeInterval &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [55/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const Date &  object 
)
inlinestatic

◆ generate() [56/92]

static int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const Date &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [57/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const DateOrDateTz &  object 
)
inlinestatic

◆ generate() [58/92]

static int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const DateOrDateTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [59/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const Datetime &  object 
)
inlinestatic

◆ generate() [60/92]

static int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const Datetime &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [61/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const DatetimeOrDatetimeTz &  object 
)
inlinestatic

◆ generate() [62/92]

static int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const DatetimeOrDatetimeTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [63/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const DatetimeTz &  object 
)
inlinestatic

◆ generate() [64/92]

static int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const DatetimeTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [65/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const DateTz &  object 
)
inlinestatic

◆ generate() [66/92]

static int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const DateTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [67/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const Time &  object 
)
inlinestatic

◆ generate() [68/92]

static int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const Time &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [69/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const TimeOrTimeTz &  object 
)
inlinestatic

◆ generate() [70/92]

static int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const TimeOrTimeTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [71/92]

int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const TimeTz &  object 
)
inlinestatic

◆ generate() [72/92]

static int bdlt::Iso8601Util::generate ( char *  buffer,
ssize_t  bufferLength,
const TimeTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [73/92]

int bdlt::Iso8601Util::generate ( std::string *  string,
const bsls::TimeInterval &  object 
)
inlinestatic

◆ generate() [74/92]

static int bdlt::Iso8601Util::generate ( std::string *  string,
const bsls::TimeInterval &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [75/92]

int bdlt::Iso8601Util::generate ( std::string *  string,
const Date &  object 
)
inlinestatic

◆ generate() [76/92]

static int bdlt::Iso8601Util::generate ( std::string *  string,
const Date &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [77/92]

int bdlt::Iso8601Util::generate ( std::string *  string,
const DateOrDateTz &  object 
)
inlinestatic

◆ generate() [78/92]

static int bdlt::Iso8601Util::generate ( std::string *  string,
const DateOrDateTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [79/92]

int bdlt::Iso8601Util::generate ( std::string *  string,
const Datetime &  object 
)
inlinestatic

◆ generate() [80/92]

static int bdlt::Iso8601Util::generate ( std::string *  string,
const Datetime &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [81/92]

int bdlt::Iso8601Util::generate ( std::string *  string,
const DatetimeOrDatetimeTz &  object 
)
inlinestatic

◆ generate() [82/92]

static int bdlt::Iso8601Util::generate ( std::string *  string,
const DatetimeOrDatetimeTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [83/92]

int bdlt::Iso8601Util::generate ( std::string *  string,
const DatetimeTz &  object 
)
inlinestatic

◆ generate() [84/92]

static int bdlt::Iso8601Util::generate ( std::string *  string,
const DatetimeTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [85/92]

int bdlt::Iso8601Util::generate ( std::string *  string,
const DateTz &  object 
)
inlinestatic

◆ generate() [86/92]

static int bdlt::Iso8601Util::generate ( std::string *  string,
const DateTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [87/92]

int bdlt::Iso8601Util::generate ( std::string *  string,
const Time &  object 
)
inlinestatic

◆ generate() [88/92]

static int bdlt::Iso8601Util::generate ( std::string *  string,
const Time &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [89/92]

int bdlt::Iso8601Util::generate ( std::string *  string,
const TimeOrTimeTz &  object 
)
inlinestatic

◆ generate() [90/92]

static int bdlt::Iso8601Util::generate ( std::string *  string,
const TimeOrTimeTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generate() [91/92]

int bdlt::Iso8601Util::generate ( std::string *  string,
const TimeTz &  object 
)
inlinestatic

◆ generate() [92/92]

static int bdlt::Iso8601Util::generate ( std::string *  string,
const TimeTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generateRaw() [1/23]

int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const bsls::TimeInterval &  object 
)
inlinestatic

Write the ISO 8601 representation of the specified object to the specified buffer. Optionally specify a configuration to affect the format of the generated string. If configuration is not supplied, the process-wide default value Iso8601UtilConfiguration::defaultConfiguration() is used. Return the number of characters in the formatted string. buffer is not null terminated.

Precondition
The behavior is undefined unless buffer has sufficient capacity.
Note
Note that a buffer of size k_MAX_STRLEN + 1 is large enough to hold any string generated by this component (counting a null terminator, if any).

◆ generateRaw() [2/23]

static int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const bsls::TimeInterval &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generateRaw() [3/23]

int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const Date &  object 
)
inlinestatic

◆ generateRaw() [4/23]

static int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const Date &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generateRaw() [5/23]

int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const DateOrDateTz &  object 
)
inlinestatic

◆ generateRaw() [6/23]

static int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const DateOrDateTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generateRaw() [7/23]

int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const Datetime &  object 
)
inlinestatic

◆ generateRaw() [8/23]

static int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const Datetime &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generateRaw() [9/23]

int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const DatetimeOrDatetimeTz &  object 
)
inlinestatic

◆ generateRaw() [10/23]

static int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const DatetimeOrDatetimeTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generateRaw() [11/23]

int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const DatetimeTz &  object 
)
inlinestatic

◆ generateRaw() [12/23]

int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const DatetimeTz &  object,
bool  useZAbbreviationForUtc 
)
inlinestatic

◆ generateRaw() [13/23]

static int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const DatetimeTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generateRaw() [14/23]

int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const DateTz &  object 
)
inlinestatic

◆ generateRaw() [15/23]

int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const DateTz &  object,
bool  useZAbbreviationForUtc 
)
inlinestatic
Deprecated:
Use the overloads taking an Iso8601UtilConfiguration object instead.

◆ generateRaw() [16/23]

static int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const DateTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generateRaw() [17/23]

int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const Time &  object 
)
inlinestatic

◆ generateRaw() [18/23]

static int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const Time &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generateRaw() [19/23]

int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const TimeOrTimeTz &  object 
)
inlinestatic

◆ generateRaw() [20/23]

static int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const TimeOrTimeTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ generateRaw() [21/23]

int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const TimeTz &  object 
)
inlinestatic

◆ generateRaw() [22/23]

int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const TimeTz &  object,
bool  useZAbbreviationForUtc 
)
inlinestatic

◆ generateRaw() [23/23]

static int bdlt::Iso8601Util::generateRaw ( char *  buffer,
const TimeTz &  object,
const GenerateConfiguration &  configuration 
)
static

◆ parse() [1/20]

int bdlt::Iso8601Util::parse ( bsls::TimeInterval *  result,
const bsl::string_view &  string 
)
inlinestatic

Parse the specified ISO 8601 string as a bsls::TimeInterval 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:

<Parsed Duration>

See "Summary of Supported ISO 8601 Duration Representations" for a complete description of this format.

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 nine digits is present in string, it is rounded to the nearest value in nanoseconds.

Precondition
The behavior is undefined unless 0 <= length.

◆ parse() [2/20]

static int bdlt::Iso8601Util::parse ( bsls::TimeInterval *  result,
const char *  string,
ssize_t  length 
)
static

Parse the specified initial length characters of the specified ISO 8601 string as a bsls::TimeInterval 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:

<Parsed Duration>

See "Summary of Supported ISO 8601 Duration Representations" for a complete description of this format.

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 nine digits is present in string, it is rounded to the nearest value in nanoseconds.

Precondition
The behavior is undefined unless 0 <= length.

◆ parse() [3/20]

int bdlt::Iso8601Util::parse ( Date *  result,
const bsl::string_view &  string,
ParseConfiguration  configuration = ParseConfiguration() 
)
inlinestatic

Parse the specified ISO 8601 string as a Date value, and load the value into the specified result, using the optionally specified configuration. Return 0 on success, and a non-zero value (with no effect) otherwise. string is assumed to be of the form:

Default: YYYY-MM-DD{(+|-)hh{:}mm|Z}
Basic: 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 zone designator is present in string, it is parsed but ignored.

Precondition
The behavior is undefined unless string.data() is non-null.

◆ parse() [4/20]

static int bdlt::Iso8601Util::parse ( Date *  result,
const char *  string,
ssize_t  length,
ParseConfiguration  configuration = ParseConfiguration() 
)
static

Parse the specified initial length characters of the specified ISO 8601 string as a Date value, and load the value into the specified result, using the optionally specified configuration. Return 0 on success, and a non-zero value (with no effect) otherwise. string is assumed to be of the form:

Default: YYYY-MM-DD{(+|-)hh{:}mm|Z}
Basic: 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 zone designator is present in string, it is parsed but ignored.

Precondition
The behavior is undefined unless 0 <= length.

◆ parse() [5/20]

int bdlt::Iso8601Util::parse ( DateOrDateTz *  result,
const bsl::string_view &  string,
ParseConfiguration  configuration = ParseConfiguration() 
)
inlinestatic

Parse the specified ISO 8601 string as a Date or DateTz value, depending on the presence of a zone designator, and load the value into the specified result, using the optionally specified configuration. Return 0 on success, and a non-zero value (with no effect) otherwise. string is assumed to be of the form:

Default: YYYY-MM-DD{(+|-)hh{:}mm|Z}
Basic: 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 zone designator is present in the string, the input is parsed as a DateTz value, and as a Date value otherwise.

Precondition
The behavior is undefined unless string.data() is non-null.

◆ parse() [6/20]

static int bdlt::Iso8601Util::parse ( DateOrDateTz *  result,
const char *  string,
ssize_t  length,
ParseConfiguration  configuration = ParseConfiguration() 
)
static

Parse the specified initial length characters of the specified ISO 8601 string as a Date or DateTz value, depending on the presence of a zone designator, and load the value into the specified result, using the optionally specified configuration. Return 0 on success, and a non-zero value (with no effect) otherwise. string is assumed to be of the form:

Default: YYYY-MM-DD{(+|-)hh{:}mm|Z}
Basic: 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 zone designator is present in the string, the input is parsed as a DateTz value, and as a Date value otherwise.

Precondition
The behavior is undefined unless 0 <= length.

◆ parse() [7/20]

int bdlt::Iso8601Util::parse ( Datetime *  result,
const bsl::string_view &  string,
ParseConfiguration  configuration = ParseConfiguration() 
)
inlinestatic

Parse the specified ISO 8601 string as a Datetime value, and load the value into the specified result, using the optionally specified configuration. Return 0 on success, and a non-zero value (with no effect) otherwise. string is assumed to be of the form:

Default: YYYY-MM-DDThh:mm:ss{(.|,)s+}{(+|-)hh{:}mm|Z}
Basic: YYYYMMDDThhmmss{(.|,)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 zone designator is present in string, the resulting Datetime value is converted to the equivalent UTC value; if the zone designator 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. If the "hh:mm:ss" portion of string is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC.

Precondition
The behavior is undefined unless string.data() is non-null.

◆ parse() [8/20]

static int bdlt::Iso8601Util::parse ( Datetime *  result,
const char *  string,
ssize_t  length,
ParseConfiguration  configuration = ParseConfiguration() 
)
static

Parse the specified initial length characters of the specified ISO 8601 string as a Datetime value, and load the value into the specified result, using the optionally specified configuration. Return 0 on success, and a non-zero value (with no effect) otherwise. string is assumed to be of the form:

Default: YYYY-MM-DDThh:mm:ss{(.|,)s+}{(+|-)hh{:}mm|Z}
Basic: YYYYMMDDThhmmss{(.|,)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 zone designator is present in string, the resulting Datetime value is converted to the equivalent UTC value; if the zone designator 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. If the "hh:mm:ss" portion of string is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC.

Precondition
The behavior is undefined unless 0 <= length.

◆ parse() [9/20]

int bdlt::Iso8601Util::parse ( DatetimeOrDatetimeTz *  result,
const bsl::string_view &  string,
ParseConfiguration  configuration = ParseConfiguration() 
)
inlinestatic

Parse the specified ISO 8601 string as a Datetime or DatetimeTz value, depending on the presence of a zone designator, and load the value into the specified result, using the optionally specified configuration. Return 0 on success, and a non-zero value (with no effect) otherwise. string is assumed to be of the form:

Default: YYYY-MM-DDThh:mm:ss{(.|,)s+}{(+|-)hh{:}mm|Z}
Basic: YYYYMMDDThhmmss{(.|,)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 zone designator is present in the string, the input is parsed as a DatetimeTz value, and as a Datetime value otherwise. 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. If the "hh:mm:ss" portion of string is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC.

Precondition
The behavior is undefined unless string.data() is non-null.

◆ parse() [10/20]

static int bdlt::Iso8601Util::parse ( DatetimeOrDatetimeTz *  result,
const char *  string,
ssize_t  length,
ParseConfiguration  configuration = ParseConfiguration() 
)
static

Parse the specified initial length characters of the specified ISO 8601 string as a Datetime or DatetimeTz value, depending on the presence of a zone designator, and load the value into the specified result, using the optionally specified configuration. Return 0 on success, and a non-zero value (with no effect) otherwise. string is assumed to be of the form:

Default: YYYY-MM-DDThh:mm:ss{(.|,)s+}{(+|-)hh{:}mm|Z}
Basic: YYYYMMDDThhmmss{(.|,)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 zone designator is present in the string, the input is parsed as a DatetimeTz value, and as a Datetime value otherwise. 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. If the "hh:mm:ss" portion of string is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC.

Precondition
The behavior is undefined unless 0 <= length.

◆ parse() [11/20]

int bdlt::Iso8601Util::parse ( DatetimeTz *  result,
const bsl::string_view &  string,
ParseConfiguration  configuration = ParseConfiguration() 
)
inlinestatic

Parse the specified ISO 8601 string as a DatetimeTz value, and load the value into the specified result, using the optionally specified configuration. Return 0 on success, and a non-zero value (with no effect) otherwise. string is assumed to be of the form:

Default: YYYY-MM-DDThh:mm:ss{(.|,)s+}{(+|-)hh{:}mm|Z}
Basic: YYYYMMDDThhmmss{(.|,)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 zone designator 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. If the "hh:mm:ss" portion of string is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC.

Precondition
The behavior is undefined unless string.data() is non-null.

◆ parse() [12/20]

static int bdlt::Iso8601Util::parse ( DatetimeTz *  result,
const char *  string,
ssize_t  length,
ParseConfiguration  configuration = ParseConfiguration() 
)
static

Parse the specified initial length characters of the specified ISO 8601 string as a DatetimeTz value, and load the value into the specified result, using the optionally specified configuration. Return 0 on success, and a non-zero value (with no effect) otherwise. string is assumed to be of the form:

Default: YYYY-MM-DDThh:mm:ss{(.|,)s+}{(+|-)hh{:}mm|Z}
Basic: YYYYMMDDThhmmss{(.|,)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 zone designator 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. If the "hh:mm:ss" portion of string is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC.

Precondition
The behavior is undefined unless 0 <= length.

◆ parse() [13/20]

int bdlt::Iso8601Util::parse ( DateTz *  result,
const bsl::string_view &  string,
ParseConfiguration  configuration = ParseConfiguration() 
)
inlinestatic

Parse the specified ISO 8601 string as a DateTz value, and load the value into the specified result, using the optionally specified configuration. Return 0 on success, and a non-zero value (with no effect) otherwise. string is assumed to be of the form:

Default: YYYY-MM-DD{(+|-)hh{:}mm|Z}
Basic: 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 zone designator is not present in string, UTC is assumed.

Precondition
The behavior is undefined unless string.data() is non-null.

◆ parse() [14/20]

static int bdlt::Iso8601Util::parse ( DateTz *  result,
const char *  string,
ssize_t  length,
ParseConfiguration  configuration = ParseConfiguration() 
)
static

Parse the specified initial length characters of the specified ISO 8601 string as a DateTz value, and load the value into the specified result, using the optionally specified configuration. Return 0 on success, and a non-zero value (with no effect) otherwise. string is assumed to be of the form:

Default: YYYY-MM-DD{(+|-)hh{:}mm|Z}
Basic: 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 zone designator is not present in string, UTC is assumed.

Precondition
The behavior is undefined unless 0 <= length.

◆ parse() [15/20]

int bdlt::Iso8601Util::parse ( Time *  result,
const bsl::string_view &  string,
ParseConfiguration  configuration = ParseConfiguration() 
)
inlinestatic

Parse the specified ISO 8601 string as a Time value, and load the value into the specified result, using the optionally specified configuration. Return 0 on success, and a non-zero value (with no effect) otherwise. string is assumed to be of the form:

Default: hh:mm:ss{(.|,)s+}{(+|-)hh{:}mm|Z}
Basic: hhmmss{(.|,)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 zone designator is present in string, the resulting Time value is converted to the equivalent UTC time; if the zone designator 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. If the "hh:mm:ss" portion of string is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC.

Precondition
The behavior is undefined unless string.data() is non-null.

◆ parse() [16/20]

static int bdlt::Iso8601Util::parse ( Time *  result,
const char *  string,
ssize_t  length,
ParseConfiguration  configuration = ParseConfiguration() 
)
static

Parse the specified initial length characters of the specified ISO 8601 string as a Time value, and load the value into the specified result, using the optionally specified configuration. Return 0 on success, and a non-zero value (with no effect) otherwise. string is assumed to be of the form:

Default: hh:mm:ss{(.|,)s+}{(+|-)hh{:}mm|Z}
Basic: hhmmss{(.|,)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 zone designator is present in string, the resulting Time value is converted to the equivalent UTC time; if the zone designator 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. If the "hh:mm:ss" portion of string is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC.

Precondition
The behavior is undefined unless 0 <= length.

◆ parse() [17/20]

int bdlt::Iso8601Util::parse ( TimeOrTimeTz *  result,
const bsl::string_view &  string,
ParseConfiguration  configuration = ParseConfiguration() 
)
inlinestatic

Parse the specified ISO 8601 string as a Time or TimeTz value, depending on the presence of a zone designator, and load the value into the specified result, using the optionally specified configuration. Return 0 on success, and a non-zero value (with no effect) otherwise. string is assumed to be of the form:

Default: hh:mm:ss{(.|,)s+}{(+|-)hh{:}mm|Z}
Basic: hhmmss{(.|,)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 zone designator is present in the string, the input is parsed as a TimeTz value, and as a Time value otherwise. 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. If the "hh:mm:ss" portion of string is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC.

Precondition
The behavior is undefined unless string.data() is non-null.

◆ parse() [18/20]

static int bdlt::Iso8601Util::parse ( TimeOrTimeTz *  result,
const char *  string,
ssize_t  length,
ParseConfiguration  configuration = ParseConfiguration() 
)
static

Parse the specified initial length characters of the specified ISO 8601 string as a Time or TimeTz value, depending on the presence of a zone designator, and load the value into the specified result, using the optionally specified configuration. Return 0 on success, and a non-zero value (with no effect) otherwise. string is assumed to be of the form:

Default: hh:mm:ss{(.|,)s+}{(+|-)hh{:}mm|Z}
Basic: hhmmss{(.|,)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 zone designator is present in the string, the input is parsed as a TimeTz value, and as a Time value otherwise. 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. If the "hh:mm:ss" portion of string is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC.

Precondition
The behavior is undefined unless 0 <= length.

◆ parse() [19/20]

int bdlt::Iso8601Util::parse ( TimeTz *  result,
const bsl::string_view &  string,
ParseConfiguration  configuration = ParseConfiguration() 
)
inlinestatic

Parse the specified ISO 8601 string as a TimeTz value, and load the value into the specified result, using the optionally specified configuration. Return 0 on success, and a non-zero value (with no effect) otherwise. string is assumed to be of the form:

Default: hh:mm:ss{(.|,)s+}{(+|-)hh{:}mm|Z}
Basic: hhmmss{(.|,)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 zone designator 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. If the "hh:mm:ss" portion of string is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC.

Precondition
The behavior is undefined unless string.data() is non-null.

◆ parse() [20/20]

static int bdlt::Iso8601Util::parse ( TimeTz *  result,
const char *  string,
ssize_t  length,
ParseConfiguration  configuration = ParseConfiguration() 
)
static

Parse the specified initial length characters of the specified ISO 8601 string as a TimeTz value, and load the value into the specified result, using the optionally specified configuration. Return 0 on success, and a non-zero value (with no effect) otherwise. string is assumed to be of the form:

Default: hh:mm:ss{(.|,)s+}{(+|-)hh{:}mm|Z}
Basic: hhmmss{(.|,)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 zone designator 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. If the "hh:mm:ss" portion of string is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC.

Precondition
The behavior is undefined unless 0 <= length.

◆ parseRelaxed() [1/6]

int bdlt::Iso8601Util::parseRelaxed ( Datetime *  result,
const bsl::string_view &  string 
)
inlinestatic

Parse the specified "relaxed" ISO 8601 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:

YYYY-MM-DD(T| )hh:mm:ss{(.|,)s+}{(+|-)hh{:}mm|Z}

The "relaxed" format parsed by this function is a superset of the strict ISO 8601 format, currently allowing a SPACE character to be used as a separated (where ISO 8601 requires a T). 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 zone designator is present in string, the resulting Datetime value is converted to the equivalent UTC value; if the zone designator 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. If the "hh:mm:ss" portion of string is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC.

Precondition
The behavior is undefined unless string.data() is non-null.
Deprecated:
Use parse` with `configuration.relaxed() == true instead.

◆ parseRelaxed() [2/6]

static BDLT_ISO8601UTIL_DEPRECATE_PARSERELAXED int bdlt::Iso8601Util::parseRelaxed ( Datetime *  result,
const char *  string,
ssize_t  length 
)
static

Parse the specified initial length characters of the specified "relaxed" ISO 8601 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:

YYYY-MM-DD(T| )hh:mm:ss{(.|,)s+}{(+|-)hh{:}mm|Z}

The "relaxed" format parsed by this function is a superset of the strict ISO 8601 format, currently allowing a SPACE character to be used as a separated (where ISO 8601 requires a T). 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 zone designator is present in string, the resulting Datetime value is converted to the equivalent UTC value; if the zone designator 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. If the "hh:mm:ss" portion of string is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC.

Precondition
The behavior is undefined unless 0 <= length.
Deprecated:
Use parse` with `configuration.relaxed() == true instead.

◆ parseRelaxed() [3/6]

int bdlt::Iso8601Util::parseRelaxed ( DatetimeOrDatetimeTz *  result,
const bsl::string_view &  string 
)
inlinestatic

Parse the specified "relaxed" ISO 8601 string as a Datetime or DatetimeTz value, depending on the presence of a zone designator, 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:

YYYY-MM-DD(T| )hh:mm:ss{(.|,)s+}{(+|-)hh{:}mm|Z}

The "relaxed" format parsed by this function is a superset of the strict ISO 8601 format, currently allowing a SPACE character to be used as a separated (where ISO 8601 requires a T). 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 zone designator is present in the string, the input is parsed as a DatetimeTz value, and as a Datetime value otherwise. 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. If the "hh:mm:ss" portion of string is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC.

Precondition
The behavior is undefined unless string.data() is non-null.
Deprecated:
Use parse` with `configuration.relaxed() == true instead.

◆ parseRelaxed() [4/6]

static BDLT_ISO8601UTIL_DEPRECATE_PARSERELAXED int bdlt::Iso8601Util::parseRelaxed ( DatetimeOrDatetimeTz *  result,
const char *  string,
ssize_t  length 
)
static

Parse the specified initial length characters of the specified "relaxed" ISO 8601 string as a Datetime or DatetimeTz value, depending on the presence of a zone designator, 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:

YYYY-MM-DD(T| )hh:mm:ss{(.|,)s+}{(+|-)hh{:}mm|Z}

The "relaxed" format parsed by this function is a superset of the strict ISO 8601 format, currently allowing a SPACE character to be used as a separated (where ISO 8601 requires a T). 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 zone designator is present in the string, the input is parsed as a DatetimeTz value, and as a Datetime value otherwise. 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. If the "hh:mm:ss" portion of string is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC.

Precondition
The behavior is undefined unless 0 <= length.
Deprecated:
Use parse` with `configuration.relaxed() == true instead.

◆ parseRelaxed() [5/6]

int bdlt::Iso8601Util::parseRelaxed ( DatetimeTz *  result,
const bsl::string_view &  string 
)
inlinestatic

Parse the specified "relaxed" ISO 8601 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:

YYYY-MM-DD(T| )hh:mm:ss{(.|,)s+}{(+|-)hh{:}mm|Z}

The "relaxed" format parsed by this function is a superset of the strict ISO 8601 format, currently allowing a SPACE character to be used as a separated (where ISO 8601 requires a T). 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 zone designator 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. If the "hh:mm:ss" portion of string is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC.

Precondition
The behavior is undefined unless string.data() is non-null.
Deprecated:
Use parse` with `configuration.relaxed() == true instead.

◆ parseRelaxed() [6/6]

static BDLT_ISO8601UTIL_DEPRECATE_PARSERELAXED int bdlt::Iso8601Util::parseRelaxed ( DatetimeTz *  result,
const char *  string,
ssize_t  length 
)
static

Parse the specified initial length characters of the specified "relaxed" ISO 8601 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:

YYYY-MM-DD(T| )hh:mm:ss{(.|,)s+}{(+|-)hh{:}mm|Z}

The "relaxed" format parsed by this function is a superset of the strict ISO 8601 format, currently allowing a SPACE character to be used as a separated (where ISO 8601 requires a T). 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 zone designator 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. If the "hh:mm:ss" portion of string is "24:00:00", then the fractional second must be absent or 0, and the zone designator must be absent or indicate UTC.

Precondition
The behavior is undefined unless 0 <= length.
Deprecated:
Use parse` with `configuration.relaxed() == true instead.

The documentation for this struct was generated from the following file: