19#if U_SHOW_CPLUSPLUS_API
26#if !UCONFIG_NO_FORMATTING
346 struct DateIntervalSink;
353 enum IntervalPatternIndex
366#ifndef U_HIDE_INTERNAL_API
372 kMaxIntervalPatternIndex = kIPI_MAX_INDEX
383 void initializeData(
const Locale& locale,
UErrorCode& status);
396 void setIntervalPatternInternally(
const UnicodeString& skeleton,
398 const UnicodeString& intervalPattern,
420 const UnicodeString* getBestSkeleton(
const UnicodeString& skeleton,
421 int8_t& bestMatchDistanceInfo)
const;
431 static void U_EXPORT2 parseSkeleton(
const UnicodeString& skeleton,
432 int32_t* skeletonFieldWidth);
446 static UBool U_EXPORT2 stringNumeric(int32_t fieldWidth,
447 int32_t anotherFieldWidth,
464 static IntervalPatternIndex U_EXPORT2 calendarFieldToIntervalIndex(
474 void deleteHash(Hashtable* hTable);
494 void copyHash(
const Hashtable* source, Hashtable* target,
UErrorCode& status);
499 UnicodeString fFallbackIntervalPattern;
501 UBool fFirstDateInPtnIsLaterDate;
505 Hashtable* fIntervalPatterns;
DateIntervalInfo is a public class for encapsulating localizable date time interval patterns.
void setIntervalPattern(const UnicodeString &skeleton, UCalendarDateFields lrgDiffCalUnit, const UnicodeString &intervalPattern, UErrorCode &status)
Provides a way for client to build interval patterns.
UnicodeString & getFallbackIntervalPattern(UnicodeString &result) const
Get the fallback interval pattern.
virtual UClassID getDynamicClassID() const
ICU "poor man's RTTI", returns a UClassID for the actual class.
virtual DateIntervalInfo * clone() const
Clone this object polymorphically.
DateIntervalInfo & operator=(const DateIntervalInfo &)
Assignment operator.
virtual UBool operator==(const DateIntervalInfo &other) const
Return true if another object is semantically equal to this one.
UBool getDefaultOrder() const
Get default order – whether the first date in pattern is later date or not.
virtual ~DateIntervalInfo()
Destructor.
void setFallbackIntervalPattern(const UnicodeString &fallbackPattern, UErrorCode &status)
Re-set the fallback interval pattern.
DateIntervalInfo(const DateIntervalInfo &)
Copy constructor.
UnicodeString & getIntervalPattern(const UnicodeString &skeleton, UCalendarDateFields field, UnicodeString &result, UErrorCode &status) const
Get the interval pattern given skeleton and the largest different calendar field.
DateIntervalInfo(const Locale &locale, UErrorCode &status)
Construct DateIntervalInfo for the given locale,.
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
DateIntervalInfo(UErrorCode &status)
Default constructor.
A Locale object represents a specific geographical, political, or cultural region.
UObject is the common ICU "boilerplate" class.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
C++ API: Date/Time Pattern Generator.
C++ API: Locale ID object.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
UCalendarDateFields
Possible fields in a UCalendar.
int8_t UBool
The ICU boolean type.
#define U_FINAL
Defined to the C++11 "final" keyword if available.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.