-/*
+/*
********************************************************************************
-* Copyright (C) 1997-2015, International Business Machines
+* Copyright (C) 1997-2016, International Business Machines
* Corporation and others. All Rights Reserved.
********************************************************************************
*
* Changed to match C++ conventions
********************************************************************************
*/
-
+
#ifndef DTFMTSYM_H
#define DTFMTSYM_H
-
+
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "unicode/ures.h"
/**
- * \file
+ * \file
* \brief C++ API: Symbols for formatting dates.
*/
* data for the default locale, it will return a last-resort object
* based on hard-coded strings.
*
- * @param type Type of calendar (as returned by Calendar::getType).
+ * @param type Type of calendar (as returned by Calendar::getType).
* Will be used to access the correct set of strings.
* (NULL or empty string defaults to "gregorian".)
* @param status Status code. Failure
* resources for the given locale, in the default calendar (Gregorian).
*
* @param locale Locale to load format data from.
- * @param type Type of calendar (as returned by Calendar::getType).
+ * @param type Type of calendar (as returned by Calendar::getType).
* Will be used to access the correct set of strings.
* (NULL or empty string defaults to "gregorian".)
* @param status Status code. Failure
* @internal
*/
static const UChar ALTERNATE_TIME_SEPARATOR = 0x002e; // '.'
-#endif /* U_HIDE_INTERNAL_API */
-#ifndef U_HIDE_DRAFT_API
/**
* Gets the time separator string. For example: ":".
* @param result Output param which will receive the time separator string.
* @return A reference to 'result'.
- * @draft ICU 55
+ * @internal
*/
UnicodeString& getTimeSeparatorString(UnicodeString& result) const;
/**
* Sets the time separator string. For example: ":".
* @param newTimeSeparator the new time separator string.
- * @draft ICU 55
+ * @internal
*/
void setTimeSeparatorString(const UnicodeString& newTimeSeparator);
-#endif /* U_HIDE_DRAFT_API */
+#endif /* U_HIDE_INTERNAL_API */
-#ifndef U_HIDE_DRAFT_API
/**
* Gets cyclic year name strings if the calendar has them, by width and context.
* For example: "jia-zi", "yi-chou", etc.
* @param width The requested name width: WIDE, ABBREVIATED, NARROW.
* @return The year name strings (DateFormatSymbols retains ownership),
* or null if they are not available for this calendar.
- * @draft ICU 54
+ * @stable ICU 54
*/
const UnicodeString* getYearNames(int32_t& count,
DtContextType context, DtWidthType width) const;
* @param count The length of the array.
* @param context The usage context: FORMAT, STANDALONE (currently only FORMAT is supported).
* @param width The name width: WIDE, ABBREVIATED, NARROW (currently only ABBREVIATED is supported).
- * @draft ICU 54
+ * @stable ICU 54
*/
void setYearNames(const UnicodeString* yearNames, int32_t count,
DtContextType context, DtWidthType width);
* @param width The requested name width: WIDE, ABBREVIATED, NARROW.
* @return The zodiac name strings (DateFormatSymbols retains ownership),
* or null if they are not available for this calendar.
- * @draft ICU 54
+ * @stable ICU 54
*/
const UnicodeString* getZodiacNames(int32_t& count,
DtContextType context, DtWidthType width) const;
* @param count The length of the array.
* @param context The usage context: FORMAT, STANDALONE (currently only FORMAT is supported).
* @param width The name width: WIDE, ABBREVIATED, NARROW (currently only ABBREVIATED is supported).
- * @draft ICU 54
+ * @stable ICU 54
*/
void setZodiacNames(const UnicodeString* zodiacNames, int32_t count,
DtContextType context, DtWidthType width);
-#endif /* U_HIDE_DRAFT_API */
-
#ifndef U_HIDE_INTERNAL_API
/**
* Somewhat temporary constants for leap month pattern types, adequate for supporting
*/
UBool fCapitalization[kCapContextUsageTypeCount][2];
+ /**
+ * Abbreviated (== short) day period strings.
+ */
+ UnicodeString *fAbbreviatedDayPeriods;
+ int32_t fAbbreviatedDayPeriodsCount;
+
+ /**
+ * Wide day period strings.
+ */
+ UnicodeString *fWideDayPeriods;
+ int32_t fWideDayPeriodsCount;
+
+ /**
+ * Narrow day period strings.
+ */
+ UnicodeString *fNarrowDayPeriods;
+ int32_t fNarrowDayPeriodsCount;
+
+ /**
+ * Stand-alone abbreviated (== short) day period strings.
+ */
+ UnicodeString *fStandaloneAbbreviatedDayPeriods;
+ int32_t fStandaloneAbbreviatedDayPeriodsCount;
+
+ /**
+ * Stand-alone wide day period strings.
+ */
+ UnicodeString *fStandaloneWideDayPeriods;
+ int32_t fStandaloneWideDayPeriodsCount;
+
+ /**
+ * Stand-alone narrow day period strings.
+ */
+ UnicodeString *fStandaloneNarrowDayPeriods;
+ int32_t fStandaloneNarrowDayPeriodsCount;
+
private:
/** valid/actual locale information
* these are always ICU locales, so the length should not be a problem