/*
******************************************************************************
-* Copyright (C) 1996-2015, International Business Machines
+* Copyright (C) 1996-2016, International Business Machines
* Corporation and others. All Rights Reserved.
******************************************************************************
*/
/**
- * \file
+ * \file
* \brief C++ API: Collation Service.
*/
-
+
/**
* File coll.h
*
IDENTICAL = UCOL_IDENTICAL // 15
};
+
+ // Cannot use #ifndef U_HIDE_DEPRECATED_API for the following, it is
+ // used by virtual methods that cannot have that conditional.
/**
* LESS is returned if source string is compared to be less than target
* string in the compare() method.
* generated sort keys.
* If the source string is null, a null collation key will be returned.
*
- * Note that sort keys are often less efficient than simply doing comparison.
+ * Note that sort keys are often less efficient than simply doing comparison.
* For more details, see the ICU User Guide.
*
* @param source the source string to be transformed into a sort key.
* generated sort keys.
* <p>If the source string is null, a null collation key will be returned.
*
- * Note that sort keys are often less efficient than simply doing comparison.
+ * Note that sort keys are often less efficient than simply doing comparison.
* For more details, see the ICU User Guide.
*
* @param source the source string to be transformed into a sort key.
* @see Collator#setReorderCodes
* @see UScriptCode
* @see UColReorderCode
- * @stable ICU 4.8
+ * @stable ICU 4.8
*/
virtual int32_t getReorderCodes(int32_t *dest,
int32_t destCapacity,
* Sets the ordering of scripts for this collator.
*
* <p>The reordering codes are a combination of script codes and reorder codes.
- * @param reorderCodes An array of script codes in the new order. This can be NULL if the
+ * @param reorderCodes An array of script codes in the new order. This can be NULL if the
* length is also set to 0. An empty array will clear any reordering codes on the collator.
* @param reorderCodesLength The length of reorderCodes.
* @param status error code
* @see Collator#getEquivalentReorderCodes
* @see UScriptCode
* @see UColReorderCode
- * @stable ICU 4.8
+ * @stable ICU 4.8
*/
virtual void setReorderCodes(const int32_t* reorderCodes,
int32_t reorderCodesLength,
* Beginning with ICU 55, scripts only reorder together if they are primary-equal,
* for example Hiragana and Katakana.
*
- * @param reorderCode The reorder code to determine equivalence for.
+ * @param reorderCode The reorder code to determine equivalence for.
* @param dest The array to fill with the script equivalence reordering codes.
- * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the
+ * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the
* function will only return the length of the result without writing any codes (pre-flighting).
- * @param status A reference to an error code value, which must not indicate
+ * @param status A reference to an error code value, which must not indicate
* a failure before the function call.
* @return The length of the of the reordering code equivalence array.
* @see ucol_setReorderCodes
* @see Collator#setReorderCodes
* @see UScriptCode
* @see UColReorderCode
- * @stable ICU 4.8
+ * @stable ICU 4.8
*/
static int32_t U_EXPORT2 getEquivalentReorderCodes(int32_t reorderCode,
int32_t* dest,
* Sort key byte arrays are zero-terminated and can be compared using
* strcmp().
*
- * Note that sort keys are often less efficient than simply doing comparison.
+ * Note that sort keys are often less efficient than simply doing comparison.
* For more details, see the ICU User Guide.
*
* @param source string to be processed.
* Sort key byte arrays are zero-terminated and can be compared using
* strcmp().
*
- * Note that sort keys are often less efficient than simply doing comparison.
+ * Note that sort keys are often less efficient than simply doing comparison.
* For more details, see the ICU User Guide.
*
* @param source string to be processed.
virtual void setLocales(const Locale& requestedLocale, const Locale& validLocale, const Locale& actualLocale);
/** Get the short definition string for a collator. This internal API harvests the collator's
- * locale and the attribute set and produces a string that can be used for opening
+ * locale and the attribute set and produces a string that can be used for opening
* a collator with the same attributes using the ucol_openFromShortString API.
* This string will be normalized.
* The structure and the syntax of the string is defined in the "Naming collators"
- * section of the users guide:
+ * section of the users guide:
* http://userguide.icu-project.org/collation/concepts#TOC-Collator-naming-scheme
* This function supports preflighting.
- *
+ *
* This is internal, and intended to be used with delegate converters.
*
* @param locale a locale that will appear as a collators locale in the resulting
- * short string definition. If NULL, the locale will be harvested
+ * short string definition. If NULL, the locale will be harvested
* from the collator.
* @param buffer space to hold the resulting string
* @param capacity capacity of the buffer
/*
********************************************************************************
-* Copyright (C) 2012-2015, International Business Machines
+* Copyright (C) 2012-2016, International Business Machines
* Corporation and others. All Rights Reserved.
********************************************************************************
*
FieldPositionIterator* posIter,
UErrorCode& status) const;
+ /* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since it is virtual. */
/**
* Format a long number using base-10 representation.
*
* Format a decimal number. Currently sets status to U_UNSUPPORTED_ERROR.
* The number is a DigitList wrapper onto a floating point decimal number.
* The default implementation in NumberFormat converts the decimal number
- * to a double and formats that.
+ * to a double and formats that.
*
* @param number The number, a DigitList format Decimal Floating Point.
* @param appendTo Output parameter to receive result.
* CompactDecimalFormat does not support parsing. This implementation
* sets status to U_UNSUPPORTED_ERROR
*
- * @param text Unused.
+ * @param text Unused.
* @param result Does not change.
* @param status Always set to U_UNSUPPORTED_ERROR.
* @stable ICU 51
/*
********************************************************************************
-* Copyright (C) 1997-2015, International Business Machines
+* Copyright (C) 1997-2016, International Business Machines
* Corporation and others. All Rights Reserved.
********************************************************************************
*
public:
#ifndef U_HIDE_INTERNAL_API
- /**
- * @internal For ICU use only
- */
- inline UBool isCustomCurrencySymbol() const {
- return fIsCustomCurrencySymbol;
- }
+ /**
+ * @internal For ICU use only
+ */
+ inline UBool isCustomCurrencySymbol() const {
+ return fIsCustomCurrencySymbol;
+ }
/**
* @internal For ICU use only
UnicodeString currencySpcBeforeSym[UNUM_CURRENCY_SPACING_COUNT];
UnicodeString currencySpcAfterSym[UNUM_CURRENCY_SPACING_COUNT];
- UBool fIsCustomCurrencySymbol;
+ UBool fIsCustomCurrencySymbol;
UBool fIsCustomIntlCurrencySymbol;
};
return *strPtr;
}
-//#ifndef U_HIDE_INTERNAL_API
-// See comments above for this function. Not hidden.
+// See comments above for this function. Not hidden with #ifndef U_HIDE_INTERNAL_API
inline const UnicodeString &
DecimalFormatSymbols::getConstSymbol(ENumberFormatSymbol symbol) const {
const UnicodeString *strPtr;
return *strPtr;
}
-//#endif /* U_HIDE_INTERNAL_API */
-
-
// -------------------------------------
inline void
DecimalFormatSymbols::setSymbol(ENumberFormatSymbol symbol, const UnicodeString &value, const UBool propogateDigits = TRUE) {
- if (symbol == kCurrencySymbol) {
- fIsCustomCurrencySymbol = TRUE;
- }
- else if (symbol == kIntlCurrencySymbol) {
- fIsCustomIntlCurrencySymbol = TRUE;
- }
+ if (symbol == kCurrencySymbol) {
+ fIsCustomCurrencySymbol = TRUE;
+ }
+ else if (symbol == kIntlCurrencySymbol) {
+ fIsCustomIntlCurrencySymbol = TRUE;
+ }
if(symbol<kFormatSymbolCount) {
fSymbols[symbol]=value;
}
virtual int32_t getAttribute( UNumberFormatAttribute attr,
UErrorCode &status) const;
-
+
/**
* Set whether or not grouping will be used in this format.
* @param newValue True, grouping will be used in this format.
* @param value The UDisplayContext value to set.
* @param status Input/output status. If at entry this indicates a failure
* status, the function will do nothing; otherwise this will be
- * updated with any new status from the function.
+ * updated with any new status from the function.
* @stable ICU 53
*/
virtual void setContext(UDisplayContext value, UErrorCode& status);
*/
int32_t getMinimumGroupingDigits() const;
+#endif /* U_HIDE_INTERNAL_API */
+
+ /* Cannot use #ifndef U_HIDE_INTERNAL_API for the following draft method since it is virtual. */
/**
* Sets the minimum grouping digits. Setting to a value less than or
* equal to 1 turns off minimum grouping digits.
*/
virtual void setMinimumGroupingDigits(int32_t newValue);
-#endif /* U_HIDE_INTERNAL_API */
/**
* Allows you to get the behavior of the decimal separator with integers.
/**
* Allows you to set the behavior of the pattern decimal mark.
- *
+ *
* if TRUE, the input must have a decimal mark if one was specified in the pattern. When
* FALSE the decimal mark may be omitted from the input.
*
/**
* Sets the <tt>Currency Context</tt> object used to display currency.
* This takes effect immediately, if this format is a
- * currency format.
- * @param currencyContext new currency context object to use.
+ * currency format.
+ * @param currencyContext new currency context object to use.
* @stable ICU 54
*/
void setCurrencyUsage(UCurrencyUsage newUsage, UErrorCode* ec);
// get the currency rounding with respect to currency usage
double getCurrencyRounding(const UChar* currency,
UErrorCode* ec) const;
-
+
// get the currency fraction with respect to currency usage
int getCurrencyFractionDigits(const UChar* currency,
UErrorCode* ec) const;
// Decimal Format Static Sets singleton.
const DecimalFormatStaticSets *fStaticSets;
-
+
protected:
#ifndef U_HIDE_INTERNAL_API
/**
* default constructor
- * @internal ICU 4.0
+ * @internal (private)
*/
DateIntervalFormat();
* On output: the offsets of the alignment field.
* @param status output param set to success/failure code on exit
* @return Reference to 'appendTo' parameter.
- * @internal
+ * @internal (private)
*/
UnicodeString& fallbackFormat(Calendar& fromCalendar,
Calendar& toCalendar,
* Caller needs to make sure it is SUCCESS
* at the function entrance
* @return Reference to 'appendTo' parameter.
- * @internal
+ * @internal (private)
*/
UnicodeString& formatImpl(Calendar& fromCalendar,
Calendar& toCalendar,
/*
******************************************************************************
-* Copyright (C) 1996-2015, International Business Machines Corporation and
+* Copyright (C) 1996-2016, International Business Machines Corporation and
* others. All Rights Reserved.
******************************************************************************
*/
* Collator, using data-driven tables. The user can create a customized
* table-based collation.
* <p>
- * For more information about the collation service see
+ * For more information about the collation service see
* <a href="http://userguide.icu-project.org/collation">the User Guide</a>.
* <p>
- * Collation service provides correct sorting orders for most locales supported in ICU.
+ * Collation service provides correct sorting orders for most locales supported in ICU.
* If specific data for a locale is not available, the orders eventually falls back
- * to the <a href="http://www.unicode.org/reports/tr35/tr35-collation.html#Root_Collation">CLDR root sort order</a>.
+ * to the <a href="http://www.unicode.org/reports/tr35/tr35-collation.html#Root_Collation">CLDR root sort order</a>.
* <p>
* Sort ordering may be customized by providing your own set of rules. For more on
* this subject see the <a href="http://userguide.icu-project.org/collation/customization">
UColAttributeValue decompositionMode,
UErrorCode& status);
-#ifndef U_HIDE_INTERNAL_API
+#ifndef U_HIDE_INTERNAL_API
/**
* TODO: document & propose as public API
* @internal
/** Opens a collator from a collator binary image created using
- * cloneBinary. Binary image used in instantiation of the
- * collator remains owned by the user and should stay around for
+ * cloneBinary. Binary image used in instantiation of the
+ * collator remains owned by the user and should stay around for
* the lifetime of the collator. The API also takes a base collator
* which must be the root collator.
* @param bin binary image owned by the user and required through the
* @see cloneBinary
* @stable ICU 3.4
*/
- RuleBasedCollator(const uint8_t *bin, int32_t length,
- const RuleBasedCollator *base,
+ RuleBasedCollator(const uint8_t *bin, int32_t length,
+ const RuleBasedCollator *base,
UErrorCode &status);
/**
/**
* The comparison function compares the character data stored in two
- * different strings. Returns information about whether a string is less
+ * different strings. Returns information about whether a string is less
* than, greater than or equal to another string.
* @param source the source string to be compared with.
* @param target the string that is to be compared with the source string.
UErrorCode &status) const;
/**
- * Does the same thing as compare but limits the comparison to a specified
+ * Does the same thing as compare but limits the comparison to a specified
* length
* @param source the source string to be compared with.
* @param target the string that is to be compared with the source string.
* @param length the length the comparison is limited to
* @param status possible error code
- * @return Returns an enum value. UCOL_GREATER if source (up to the specified
- * length) is greater than target; UCOL_EQUAL if source (up to specified
- * length) is equal to target; UCOL_LESS if source (up to the specified
+ * @return Returns an enum value. UCOL_GREATER if source (up to the specified
+ * length) is greater than target; UCOL_EQUAL if source (up to specified
+ * length) is equal to target; UCOL_LESS if source (up to the specified
* length) is less than target.
* @stable ICU 2.6
*/
/**
* The comparison function compares the character data stored in two
- * different string arrays. Returns information about whether a string array
+ * different string arrays. Returns information about whether a string array
* is less than, greater than or equal to another string array.
* @param source the source string array to be compared with.
* @param sourceLength the length of the source string array. If this value
* Transforms the string into a series of characters
* that can be compared with CollationKey.compare().
*
- * Note that sort keys are often less efficient than simply doing comparison.
+ * Note that sort keys are often less efficient than simply doing comparison.
* For more details, see the ICU User Guide.
*
* @param source the source string.
* Transforms a specified region of the string into a series of characters
* that can be compared with CollationKey.compare.
*
- * Note that sort keys are often less efficient than simply doing comparison.
+ * Note that sort keys are often less efficient than simply doing comparison.
* For more details, see the ICU User Guide.
*
* @param source the source string.
*/
virtual void getVersion(UVersionInfo info) const;
-#ifndef U_HIDE_DEPRECATED_API
+#ifndef U_HIDE_DEPRECATED_API
/**
* Returns the maximum length of any expansion sequences that end with the
* specified comparison order.
*/
static UClassID U_EXPORT2 getStaticClassID(void);
-#ifndef U_HIDE_DEPRECATED_API
+#ifndef U_HIDE_DEPRECATED_API
/**
* Do not use this method: The caller and the ICU library might use different heaps.
* Use cloneBinary() instead which writes to caller-provided memory.
uint8_t *cloneRuleData(int32_t &length, UErrorCode &status) const;
#endif /* U_HIDE_DEPRECATED_API */
- /** Creates a binary image of a collator. This binary image can be stored and
+ /** Creates a binary image of a collator. This binary image can be stored and
* later used to instantiate a collator using ucol_openBinary.
* This API supports preflighting.
* @param buffer a fill-in buffer to receive the binary image
virtual uint32_t getVariableTop(UErrorCode &status) const;
/**
- * Get a UnicodeSet that contains all the characters and sequences tailored in
+ * Get a UnicodeSet that contains all the characters and sequences tailored in
* this collator.
* @param status error code of the operation
- * @return a pointer to a UnicodeSet object containing all the
+ * @return a pointer to a UnicodeSet object containing all the
* code points and sequences that may sort differently than
* in the root collator. The object must be disposed of by using delete
* @stable ICU 2.4
/**
* Get the sort key as an array of bytes from a UnicodeString.
*
- * Note that sort keys are often less efficient than simply doing comparison.
+ * Note that sort keys are often less efficient than simply doing comparison.
* For more details, see the ICU User Guide.
*
* @param source string to be processed.
/**
* Get the sort key as an array of bytes from a UChar buffer.
*
- * Note that sort keys are often less efficient than simply doing comparison.
+ * Note that sort keys are often less efficient than simply doing comparison.
* For more details, see the ICU User Guide.
*
* @param source string to be processed.
* @see ucol_setReorderCodes
* @see Collator#getEquivalentReorderCodes
* @see Collator#setReorderCodes
- * @stable ICU 4.8
+ * @stable ICU 4.8
*/
virtual int32_t getReorderCodes(int32_t *dest,
int32_t destCapacity,
/**
* Sets the ordering of scripts for this collator.
- * @param reorderCodes An array of script codes in the new order. This can be NULL if the
+ * @param reorderCodes An array of script codes in the new order. This can be NULL if the
* length is also set to 0. An empty array will clear any reordering codes on the collator.
* @param reorderCodesLength The length of reorderCodes.
* @param status error code
* @see ucol_setReorderCodes
* @see Collator#getReorderCodes
* @see Collator#getEquivalentReorderCodes
- * @stable ICU 4.8
+ * @stable ICU 4.8
*/
virtual void setReorderCodes(const int32_t* reorderCodes,
int32_t reorderCodesLength,
UErrorCode &errorCode) const;
/** Get the short definition string for a collator. This internal API harvests the collator's
- * locale and the attribute set and produces a string that can be used for opening
+ * locale and the attribute set and produces a string that can be used for opening
* a collator with the same attributes using the ucol_openFromShortString API.
* This string will be normalized.
* The structure and the syntax of the string is defined in the "Naming collators"
- * section of the users guide:
+ * section of the users guide:
* http://userguide.icu-project.org/collation/concepts#TOC-Collator-naming-scheme
* This function supports preflighting.
- *
+ *
* This is internal, and intended to be used with delegate converters.
*
* @param locale a locale that will appear as a collators locale in the resulting
- * short string definition. If NULL, the locale will be harvested
+ * short string definition. If NULL, the locale will be harvested
* from the collator.
* @param buffer space to hold the resulting string
* @param capacity capacity of the buffer
UCharIterator *iter, uint32_t state[2],
uint8_t *dest, int32_t count, UErrorCode &errorCode) const;
+ // Do not enclose the default constructor with #ifndef U_HIDE_INTERNAL_API
/**
* Only for use in ucol_openRules().
* @internal
/*
*******************************************************************************
- * Copyright (C) 2009-2014, Google, International Business Machines Corporation and *
- * others. All Rights Reserved. *
+ * Copyright (C) 2009-2016, International Business Machines Corporation, *
+ * Google, and others. All Rights Reserved. *
*******************************************************************************
*/
/**
* Create Instance.
- * @param timeUnitField time unit field based on which the instance
+ * @param timeUnitField time unit field based on which the instance
* is created.
- * @param status input-output error code.
+ * @param status input-output error code.
* If the timeUnitField is invalid,
* then this will be set to U_ILLEGAL_ARGUMENT_ERROR.
* @return a TimeUnit instance
- * @stable ICU 4.2
+ * @stable ICU 4.2
*/
static TimeUnit* U_EXPORT2 createInstance(UTimeUnitFields timeUnitField,
UErrorCode& status);
/**
* Override clone.
- * @stable ICU 4.2
+ * @stable ICU 4.2
*/
virtual UObject* clone() const;
/**
* Copy operator.
- * @stable ICU 4.2
+ * @stable ICU 4.2
*/
TimeUnit(const TimeUnit& other);
/**
* Assignment operator.
- * @stable ICU 4.2
+ * @stable ICU 4.2
*/
TimeUnit& operator=(const TimeUnit& other);
* @return The class ID for this object. All objects of a given
* class have the same class ID. Objects of other classes have
* different class IDs.
- * @stable ICU 4.2
+ * @stable ICU 4.2
*/
virtual UClassID getDynamicClassID() const;
* Returns the class ID for this class. This is used to compare to
* the return value of getDynamicClassID().
* @return The class ID for all objects of this class.
- * @stable ICU 4.2
+ * @stable ICU 4.2
*/
static UClassID U_EXPORT2 getStaticClassID();
/**
* Get time unit field.
* @return time unit field.
- * @stable ICU 4.2
+ * @stable ICU 4.2
*/
UTimeUnitFields getTimeUnitField() const;
/**
* Destructor.
- * @stable ICU 4.2
+ * @stable ICU 4.2
*/
virtual ~TimeUnit();
/**
* Constructor
- * @internal ICU 4.2
+ * @internal (private)
*/
TimeUnit(UTimeUnitFields timeUnitField);
*/
typedef void* UDateFormat;
-/** The possible date/time format styles
+/** The possible date/time format styles
* @stable ICU 2.6
*/
typedef enum UDateFormatStyle {
/** Bitfield for relative date */
UDAT_RELATIVE = (1 << 7),
-
+
UDAT_FULL_RELATIVE = UDAT_FULL | UDAT_RELATIVE,
-
+
UDAT_LONG_RELATIVE = UDAT_LONG | UDAT_RELATIVE,
-
+
UDAT_MEDIUM_RELATIVE = UDAT_MEDIUM | UDAT_RELATIVE,
-
+
UDAT_SHORT_RELATIVE = UDAT_SHORT | UDAT_RELATIVE,
-
-
+
+
/** No style */
UDAT_NONE = -1,
* Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0
*/
-#define UDAT_YEAR_ABBR_MONTH_WEEKDAY_DAY "yMMMEd"
+#define UDAT_YEAR_ABBR_MONTH_WEEKDAY_DAY "yMMMEd"
/**
* Constant for date skeleton with year, numeric month, weekday, and day.
* Used in combinations date + time, date + time + zone, or time + zone.
/* deprecated skeleton constants */
-#ifndef U_HIDE_DEPRECATED_API
+#ifndef U_HIDE_DEPRECATED_API
/**
* Constant for date skeleton with standalone month.
* @deprecated ICU 50 Use UDAT_MONTH instead.
UDAT_RELATED_YEAR_FIELD = 34,
#endif /* U_HIDE_INTERNAL_API */
+#ifndef U_HIDE_DRAFT_API
/**
* FieldPosition selector for 'b' field alignment.
* Displays midnight and noon for 12am and 12pm, respectively, if available;
* @draft ICU 57
*/
UDAT_FLEXIBLE_DAY_PERIOD_FIELD = 36,
+#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_INTERNAL_API
/**
* an error occurred.
* @stable ICU 2.0
*/
-U_STABLE UDateFormat* U_EXPORT2
+U_STABLE UDateFormat* U_EXPORT2
udat_open(UDateFormatStyle timeStyle,
UDateFormatStyle dateStyle,
const char *locale,
* @param format The formatter to close.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_STABLE void U_EXPORT2
udat_close(UDateFormat* format);
/**
* DateFormat boolean attributes
- *
+ *
* @stable ICU 53
*/
typedef enum UDateFormatBooleanAttribute {
* @draft ICU 56
*/
UDAT_PARSE_PARTIAL_LITERAL_MATCH = 2,
- /**
- * indicates tolerance of pattern mismatch between input data and specified format pattern.
- * e.g. accepting "September" for a month pattern of MMM ("Sep")
+ /**
+ * indicates tolerance of pattern mismatch between input data and specified format pattern.
+ * e.g. accepting "September" for a month pattern of MMM ("Sep")
* @draft ICU 56
- */
+ */
UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH = 3,
#endif /* U_HIDE_DRAFT_API */
/**
* @return A pointer to a UDateFormat identical to fmt.
* @stable ICU 2.0
*/
-U_STABLE UDateFormat* U_EXPORT2
+U_STABLE UDateFormat* U_EXPORT2
udat_clone(const UDateFormat *fmt,
UErrorCode *status);
* @see UFieldPosition
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_STABLE int32_t U_EXPORT2
udat_format( const UDateFormat* format,
UDate dateToFormat,
UChar* result,
* @see UFieldPositionIterator
* @stable ICU 55
*/
-U_STABLE int32_t U_EXPORT2
+U_STABLE int32_t U_EXPORT2
udat_formatForFields( const UDateFormat* format,
UDate dateToFormat,
UChar* result,
* @see udat_format
* @stable ICU 2.0
*/
-U_STABLE UDate U_EXPORT2
+U_STABLE UDate U_EXPORT2
udat_parse(const UDateFormat* format,
const UChar* text,
int32_t textLength,
* @see udat_format
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_STABLE void U_EXPORT2
udat_parseCalendar(const UDateFormat* format,
UCalendar* calendar,
const UChar* text,
* @see udat_setLenient
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_STABLE UBool U_EXPORT2
udat_isLenient(const UDateFormat* fmt);
/**
* @see dat_isLenient
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_STABLE void U_EXPORT2
udat_setLenient( UDateFormat* fmt,
UBool isLenient);
* @see udat_setCalendar
* @stable ICU 2.0
*/
-U_STABLE const UCalendar* U_EXPORT2
+U_STABLE const UCalendar* U_EXPORT2
udat_getCalendar(const UDateFormat* fmt);
/**
* @see udat_setCalendar
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_STABLE void U_EXPORT2
udat_setCalendar( UDateFormat* fmt,
const UCalendar* calendarToSet);
* @see udat_setNumberFormat
* @stable ICU 2.0
*/
-U_STABLE const UNumberFormat* U_EXPORT2
+U_STABLE const UNumberFormat* U_EXPORT2
udat_getNumberFormat(const UDateFormat* fmt);
/**
* @see udat_setNumberFormatForField
* @stable ICU 54
*/
-U_STABLE const UNumberFormat* U_EXPORT2
+U_STABLE const UNumberFormat* U_EXPORT2
udat_getNumberFormatForField(const UDateFormat* fmt, UChar field);
/**
* Set the UNumberFormat for specific field associated with an UDateFormat.
* It can be a single field like: "y"(year) or "M"(month)
* It can be several field combined together: "yM"(year and month)
-* Note:
+* Note:
* 1 symbol field is enough for multiple symbol field (so "y" will override "yy", "yyy")
* If the field is not numeric, then override has no effect (like "MMM" will use abbreviation, not numerical field)
*
* @see udat_getNumberFormatForField
* @stable ICU 54
*/
-U_STABLE void U_EXPORT2
+U_STABLE void U_EXPORT2
udat_adoptNumberFormatForFields( UDateFormat* fmt,
const UChar* fields,
UNumberFormat* numberFormatToSet,
* Set the UNumberFormat associated with an UDateFormat.
* A UDateFormat uses a UNumberFormat to format numbers within a date,
* for example the day number.
-* This method also clears per field NumberFormat instances previously
-* set by {@see udat_setNumberFormatForField}
+* This method also clears per field NumberFormat instances previously
+* set by {@see udat_setNumberFormatForField}
* @param fmt The formatter to set.
* @param numberFormatToSet A pointer to the UNumberFormat to be used by fmt to format numbers.
* @see udat_getNumberFormat
* @see udat_setNumberFormatForField
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_STABLE void U_EXPORT2
udat_setNumberFormat( UDateFormat* fmt,
const UNumberFormat* numberFormatToSet);
/**
* @see udat_getNumberFormat
* @stable ICU 54
*/
-U_STABLE void U_EXPORT2
+U_STABLE void U_EXPORT2
udat_adoptNumberFormat( UDateFormat* fmt,
UNumberFormat* numberFormatToAdopt);
/**
* @see udat_countAvailable
* @stable ICU 2.0
*/
-U_STABLE const char* U_EXPORT2
+U_STABLE const char* U_EXPORT2
udat_getAvailable(int32_t localeIndex);
/**
* @see udat_getAvailable
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_STABLE int32_t U_EXPORT2
udat_countAvailable(void);
/**
* @see udat_Set2DigitYearStart
* @stable ICU 2.0
*/
-U_STABLE UDate U_EXPORT2
+U_STABLE UDate U_EXPORT2
udat_get2DigitYearStart( const UDateFormat *fmt,
UErrorCode *status);
* @see udat_Set2DigitYearStart
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_STABLE void U_EXPORT2
udat_set2DigitYearStart( UDateFormat *fmt,
UDate d,
UErrorCode *status);
* @see udat_applyPattern
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_STABLE int32_t U_EXPORT2
udat_toPattern( const UDateFormat *fmt,
UBool localized,
UChar *result,
* @see udat_toPattern
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_STABLE void U_EXPORT2
udat_applyPattern( UDateFormat *format,
UBool localized,
const UChar *pattern,
int32_t patternLength);
-/**
- * The possible types of date format symbols
+/**
+ * The possible types of date format symbols
* @stable ICU 2.6
*/
typedef enum UDateFormatSymbolType {
* @see udat_setSymbols
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_STABLE int32_t U_EXPORT2
udat_getSymbols(const UDateFormat *fmt,
UDateFormatSymbolType type,
int32_t symbolIndex,
* @see udat_setSymbols
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_STABLE int32_t U_EXPORT2
udat_countSymbols( const UDateFormat *fmt,
UDateFormatSymbolType type);
* @see udat_countSymbols
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_STABLE void U_EXPORT2
udat_setSymbols( UDateFormat *format,
UDateFormatSymbolType type,
int32_t symbolIndex,
* Get the locale for this date format object.
* You can choose between valid and actual locale.
* @param fmt The formatter to get the locale from
- * @param type type of the locale we're looking for (valid or actual)
+ * @param type type of the locale we're looking for (valid or actual)
* @param status error code for the operation
* @return the locale name
* @stable ICU 2.8
U_STABLE const char* U_EXPORT2
udat_getLocaleByType(const UDateFormat *fmt,
ULocDataLocaleType type,
- UErrorCode* status);
+ UErrorCode* status);
/**
* Set a particular UDisplayContext value in the formatter, such as
* @see udat_applyPatternRelative
* @internal ICU 4.2 technology preview
*/
-U_INTERNAL int32_t U_EXPORT2
+U_INTERNAL int32_t U_EXPORT2
udat_toPatternRelativeDate(const UDateFormat *fmt,
UChar *result,
int32_t resultLength,
* @see udat_applyPatternRelative
* @internal ICU 4.2 technology preview
*/
-U_INTERNAL int32_t U_EXPORT2
+U_INTERNAL int32_t U_EXPORT2
udat_toPatternRelativeTime(const UDateFormat *fmt,
UChar *result,
int32_t resultLength,
* @see udat_toPatternRelativeDate, udat_toPatternRelativeTime
* @internal ICU 4.2 technology preview
*/
-U_INTERNAL void U_EXPORT2
+U_INTERNAL void U_EXPORT2
udat_applyPatternRelative(UDateFormat *format,
const UChar *datePattern,
int32_t datePatternLength,