FormattedDateIntervalData;
40 classDateIntervalFormat;
104FormattedDateIntervalData *fData;
109: fData(nullptr), fErrorCode(errorCode) {}
110 friend classDateIntervalFormat;
741 UBoollaterDateFirst;
795 voidfallbackFormatRange(
800FieldPositionHandler& fphandler,
827 UBoolfromToOnSameDay,
830FieldPositionHandler& fphandler,
923 static voidU_EXPORT2 getDateTimeSkeleton(
const UnicodeString& skeleton,
986int8_t differenceInfo,
1019 static voidU_EXPORT2 adjustFieldWidth(
1023int8_t differenceInfo,
1024 UBoolsuppressDayPeriodField,
1034 static voidU_EXPORT2 findReplaceInPattern(
UnicodeString& targetString,
1069 staticint32_t U_EXPORT2 splitPatternInto2Part(
const UnicodeString& intervalPattern);
1089 UBoollaterDateFirst);
1104 UBoollaterDateFirst);
1135FieldPositionHandler& fphandler,
1142FieldPositionHandler& fphandler,
1147 static constchar16_t fgCalendarFieldToPatternLetter[];
1174PatternInfo fIntervalPatterns[DateIntervalInfo::kIPI_MAX_INDEX];
Base class for objects to which Unicode characters and strings can be appended.
Calendar is an abstract base class for converting between a UDate object and a set of integer fields ...
Represents a span of a string containing a given field.
DateFormat is an abstract class for a family of classes that convert dates and times from their inter...
DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...
virtual void setTimeZone(const TimeZone &zone)
Sets the time zone for the calendar used by this DateIntervalFormat object.
UnicodeString & format(Calendar &fromCalendar, Calendar &toCalendar, UnicodeString &appendTo, FieldPosition &fieldPosition, UErrorCode &status) const
Format 2 Calendars to produce a string.
const DateFormat * getDateFormat() const
Gets the date formatter.
static DateIntervalFormat * createInstance(const UnicodeString &skeleton, const Locale &locale, UErrorCode &status)
Construct a DateIntervalFormat from skeleton and a given locale.
UnicodeString & format(const DateInterval *dtInterval, UnicodeString &appendTo, FieldPosition &fieldPosition, UErrorCode &status) const
Format a DateInterval to produce a string.
virtual DateIntervalFormat * clone() const override
Clone this Format object polymorphically.
virtual void parseObject(const UnicodeString &source, Formattable &result, ParsePosition &parse_pos) const override
Date interval parsing is not supported.
virtual ~DateIntervalFormat()
Destructor.
virtual void setContext(UDisplayContext value, UErrorCode &status)
Set a particular UDisplayContext value in the formatter, such as UDISPCTX_CAPITALIZATION_FOR_STANDALO...
static DateIntervalFormat * createInstance(const UnicodeString &skeleton, const Locale &locale, const DateIntervalInfo &dtitvinf, UErrorCode &status)
Construct a DateIntervalFormat from skeleton a DateIntervalInfo, and the given locale.
DateIntervalFormat & operator=(const DateIntervalFormat &)
Assignment operator.
virtual UnicodeString & format(const Formattable &obj, UnicodeString &appendTo, FieldPosition &fieldPosition, UErrorCode &status) const override
Format an object to produce a string.
static DateIntervalFormat * createInstance(const UnicodeString &skeleton, UErrorCode &status)
Construct a DateIntervalFormat from skeleton and the default locale.
virtual void adoptTimeZone(TimeZone *zoneToAdopt)
Sets the time zone for the calendar used by this DateIntervalFormat object.
virtual const TimeZone & getTimeZone() const
Returns a reference to the TimeZone used by this DateIntervalFormat's calendar.
virtual UDisplayContext getContext(UDisplayContextType type, UErrorCode &status) const
Get the formatter's UDisplayContext value for the specified UDisplayContextType, such as UDISPCTX_TYP...
virtual bool operator==(const Format &other) const override
Return true if the given Format objects are semantically equal.
virtual UClassID getDynamicClassID() const override
Returns a unique class ID POLYMORPHICALLY.
FormattedDateInterval formatToValue(Calendar &fromCalendar, Calendar &toCalendar, UErrorCode &status) const
Format 2 Calendars to produce a FormattedDateInterval.
DateIntervalFormat(const DateIntervalFormat &)
Copy constructor.
static DateIntervalFormat * createInstance(const UnicodeString &skeleton, const DateIntervalInfo &dtitvinf, UErrorCode &status)
Construct a DateIntervalFormat from skeleton DateIntervalInfo, and default locale.
const DateIntervalInfo * getDateIntervalInfo() const
Gets the date time interval patterns.
FormattedDateInterval formatToValue(const DateInterval &dtInterval, UErrorCode &status) const
Format a DateInterval to produce a FormattedDateInterval.
static UClassID getStaticClassID()
Return the class ID for this class.
void setDateIntervalInfo(const DateIntervalInfo &newIntervalPatterns, UErrorCode &status)
Set the date time interval patterns.
DateIntervalInfo is a public class for encapsulating localizable date time interval patterns.
This class represents a date interval.
FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...
Base class for all formats.
UnicodeString & format(const Formattable &obj, UnicodeString &appendTo, UErrorCode &status) const
Formats an object to produce a string.
Formattable objects can be passed to the Format class or its subclasses for formatting.
An immutable class containing the result of a date interval formatting operation.
FormattedDateInterval & operator=(FormattedDateInterval &&src) noexcept
Move assignment: Leaves the source FormattedDateInterval in an undefined state.
FormattedDateInterval(const FormattedDateInterval &)=delete
Copying not supported; use move constructor instead.
Appendable & appendTo(Appendable &appendable, UErrorCode &status) const override
Appends the formatted string to an Appendable.
UBool nextPosition(ConstrainedFieldPosition &cfpos, UErrorCode &status) const override
Iterates over field positions in the FormattedValue.
virtual ~FormattedDateInterval() override
Destruct an instance of FormattedDateInterval.
FormattedDateInterval()
Default constructor; makes an empty FormattedDateInterval.
UnicodeString toString(UErrorCode &status) const override
Returns the formatted string as a self-contained UnicodeString.
UnicodeString toTempString(UErrorCode &status) const override
Returns the formatted string as a read-only alias to memory owned by the FormattedValue.
FormattedDateInterval & operator=(const FormattedDateInterval &)=delete
Copying not supported; use move assignment instead.
FormattedDateInterval(FormattedDateInterval &&src) noexcept
Move constructor: Leaves the source FormattedDateInterval in an undefined state.
An abstract formatted value: a string with associated field attributes.
A Locale object represents a specific geographical, political, or cultural region.
ParsePosition is a simple class used by Format and its subclasses to keep track of the current positi...
SimpleDateFormat is a concrete class for formatting and parsing dates in a language-independent manne...
TimeZone represents a time zone offset, and also figures out daylight savings.
UMemory is the common ICU base class.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
C++ API: Date Interval data type.
C++ API: Date/Time interval patterns for formatting date/time interval.
C++ API: Date/Time Pattern Generator.
C++ API: Abstract operations for localized strings.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
bool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
C++ API: Format and parse dates in a language-independent manner.
UCalendarDateFields
Possible fields in a UCalendar.
C API: Display context types (enum values)
UDisplayContextType
Display context types, for getting values of a particular setting.
UDisplayContext
Display context settings.
int8_t UBool
The ICU boolean type, a signed-byte integer.
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.
@ U_INVALID_STATE_ERROR
Requested operation can not be completed with ICU in its current state.
@ U_ZERO_ERROR
No error, no warning.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4